I have created an Azure DevOps 2022 pipeline to build a .Net 7 application. At one point during my creation of this pipeline, it was properly building the application, packaging it into a single-file executable, then zipping it and its pdb's (and config files) into a nice package. At some point this stopped working and I am not sure what changed. Now, for the life of me, I cannot get this pipeline to build the single-file executable (and consequently, no zip file is created).
The code is indeed successfully compiled and I am left with an executable with all associated DLLs as I would expect normally on the build agent which are moved into the artifact location.
I have researched this for days and have been unable to figure out what's wrong. I have looked at this article, and this one, and this one too, plus a few others. I have ensured that my Build step command is "publish" and have tried every combination of using -p:PublishSingleFile and --self-contained, and ensured that I am specifying -r win-x64. Yet this still refuses to work. I have looked over verbose Msbuild output very closely and found no clues as to why this refuses to build.
Here is the YAML for the build step:
- task: DotNetCoreCLI@2
displayName: 'Build MoverSvc single-file executable'
inputs:
command: publish
publishWebProjects: false
projects: 'MoverSvc\MoverSvc.csproj'
arguments: '-c Release -r win-x64 -p:PublishSingleFile=True --output $(Build.ArtifactStagingDirectory) --self-contained false'
This must be my fault, but just can't seem to find what I missed/changed/broke. Thanks for any help or direction you can provide me.