You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately, there's an issue with Linux MSBuild that translates escape backslashes \ to slashes / on the fly. Thus on, say Azure DevOps where you're running on an Ubuntu agent, you'll get an error like:
MSBUILD : error MSB1006: Property is not valid. [/home/vsts/work/1/s/default.proj]
Switch: cobertura/
The quotes aren't escaped and the command line gets parsed wrong.
On Windows this works as expected, and if you use dotnet msbuild on Linux it also works as expected. You'll see the error if you're on Linux and:
You call the binary Linux MSBuild rather than dotnet msbuild OR
You're in Azure DevOps on a Linux agent and use the MSBuild task (which uses the binary Linux MSBuild)
And maybe this issue is enough, something folks can search for and find later. I just know I spent like two hours trying to figure out why things worked fine on my Mac using dotnet msbuild but the Ubuntu agent was failing every time.
The text was updated successfully, but these errors were encountered:
This isn't a problem with Coverlet but maybe something to add to the documentation.
If you want to specify multiple output formats, the docs say you need to escape the quotes around the formats
/p:CoverletOutputFormat=\"json,cobertura\"
so in MSBuild it'd look like
Unfortunately, there's an issue with Linux MSBuild that translates escape backslashes
\
to slashes/
on the fly. Thus on, say Azure DevOps where you're running on an Ubuntu agent, you'll get an error like:The quotes aren't escaped and the command line gets parsed wrong.
On Windows this works as expected, and if you use
dotnet msbuild
on Linux it also works as expected. You'll see the error if you're on Linux and:dotnet msbuild
ORMSBuild
task (which uses the binary Linux MSBuild)And maybe this issue is enough, something folks can search for and find later. I just know I spent like two hours trying to figure out why things worked fine on my Mac using
dotnet msbuild
but the Ubuntu agent was failing every time.The text was updated successfully, but these errors were encountered: