I am using Azure DevOps Server (on Prem) and am trying to build a solution (windows service, C#) for Net 8.0.204.
I have it working, and it is producing the Artifact that I can use in the release.
The issue is that when I also using the publishing wizard in Visual Studio, In the publish profile, I have the option to set the deployment mode to ‘self-contained’, the target runtime and the ‘produce single file’. These create a bin directory with only a few files contained.
When I run the build in Azure DevOps, I am missing these settings and the bin folder contains a lot of content – I believe I need to add the settings as /P: parameters under MSBuild Arguments but can’t find up-to-date examples.
Does anyone have some examples? The only ones I have are for web projects and this is a windows console project.
Regards