Automatic Cloud Code deployment generates .ccm file that is too large

So I am using the manual deployment method as described here, which is working fine as the resulting .ccm-file is super small. But since this is tedious, I tried automating it. I created a publishing profile and called ugs deploy <path-to-directory>.
However, I get the following error:

Status: Failed to Deploy - Module could not be updated because the file provided is over the size limit of 10MB.

I looked into my temp-folder and saw that the .ccm-file had over 15mb. In the module-compilation folder there were Unit tests and all sorts of stuff that I dont need. My main project .dll still only had 76KB but somehow everything else was included into the .ccm-file. Deleting the folder did not help.

Here is my publishsing profile, that I created in VS:

<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
  <PropertyGroup>
    <Configuration>Release</Configuration>
    <Platform>Any CPU</Platform>
    <PublishDir>bin\Release\net7.0\publish\UGSModuleOnly\TTTT\</PublishDir>
    <PublishProtocol>FileSystem</PublishProtocol>
    <_TargetId>Folder</_TargetId>
    <TargetFramework>net7.0</TargetFramework>
    <RuntimeIdentifier>linux-x64</RuntimeIdentifier>
    <SelfContained>false</SelfContained>
    <PublishSingleFile>false</PublishSingleFile>
  </PropertyGroup>
</Project>

hello,

please see here: Cloud code deployment error

for a solution