I have a csproj with some folders with code from different clients. When i publish my app i get something like this:
So in order to give it to client 3 i have to delete some files and end like this:
Whats the best way to aproach this? I searched something like project configuration like "Debug" and "Release" but i dont know if thats ok and how to specify the folders.
You can add a configuration per client and then in your csproj do something like this:
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Client3|AnyCPU'">
<OutputPath>bin\Client3\</OutputPath>
<ExcludeFilesFromDeployment>SomeFileThatNeedToBeDeleted</ExcludeFilesFromDeployment>
<ExcludeFoldersFromDeployment>Client1Folder;Client2Folder</ExcludeFoldersFromDeployment>
</PropertyGroup>
Publish
dotnet publish -c Client3