How do I tell Azure to build that precise Main/A/*.csproj file and do
I need to use /p:OutputPath inside the VSBuild@1 task
If you're using classic UI, you need to unlink the default solution:

And then choose the A project by the browse option:

If you're using Yaml format, you should use something like solution: A/A.csproj
to specify which project to build.
Note:
Since now we're building single project instead of whole solution, we should use Project Configuration
instead of Solution Configuration
. any cpu
is Solution Platform instead of Project Platform(AnyCPU
). So we should make sure we're building single project with AnyCPU if we want to build one project with this setting.
If you got error The OutputPath property is not set for project 'A.csproj'
, that indicates you should use valid project configuration. In your case, if you're using any cpu
, change it to AnyCPU
.
In addition:
1.To publish the build results as build artifacts for further use. You can use Copy Files
task and Publish Build Artifacts
task like this:
Copy Files Task.

Publish Build Artifacts

Then you can download the Test.zip in Summary tab from build log page. Also, you can use this artifact in release pipeline by using download artifacts task.
- Check this, if you're trying build code project instead of whole solution. You can consider
MSBuild
Task. They(Msbuild task,VS Build task) both calls msbuild.exe to do the build job.
Hope all above helps :)