Breaking

Monday, May 3, 2021

Azure DevOps Pipelines - The OutputPath property is not set for project

When trying to build a csproj file using Azure DevOps pipelines, it failed with the following error message:

The OutputPath property is not set for project

The important thing to notice here is that this only happens when pointing the build task to a csproj file instead of a sln file.

Turns out that there is a small difference between how the platform variable is configured at the solution level vs the project level.

These are the variable settings we use inside the build task:

  • $(BuildConfiguration)= “Release”
  • $(BuildPlatform)=”Any CPU”

When I took a look at the csproj file it was expecting “AnyCPU” as the platform setting not “Any CPU”. (Notice the space)

I fixed it by setting the BuildPlatform to “AnyCPU” and not use the build variable for this specific task.

No comments:

Post a Comment