VMR Stage2 build fails with `error MSB1006: Property is not valid.`
Closed this issue · 13 comments
Failing build (internal Microsoft link)
VMR Stage 2 legs are building failed with below message:
MSBUILD : error MSB1006: Property is not valid.
Switch: RelativeOutputPathBase
For switch syntax, type "MSBuild -help"
'application-insights' failed during build.
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
Not sure why it's complaining about setting an MSBuild property. That is set here: https://github.com/dotnet/source-build-externals/blob/f08c68bfc6c6e065f72e56dcd4dc15d3ea1f43a4/repo-projects/application-insights.proj#L20
Here's the command it's failing on:
/vmr/.dotnet/dotnet restore /bl:restore.binlog /vmr/src/source-build-externals/artifacts/sb/src/src/application-insights//BASE/src/Microsoft.ApplicationInsights/Microsoft.ApplicationInsights.csproj /p:Configuration=Release /p:StableRelease=True /p:RelativeOutputPathBase= /v:minimal >> /vmr/src/source-build-externals/artifacts/sb/src/artifacts/bin/application-insights/logs/application-insights.log 2>&1 /p:BinRoot=/vmr/src/source-build-externals/artifacts/sb/src/src/application-insights//bin /p:ObjRoot=/vmr/src/source-build-externals/artifacts/sb/src/src/application-insights//obj /p:PackageOutputDir=/vmr/src/source-build-externals/artifacts/sb/src/src/application-insights//bin/Release
That's identical to the command in stage 1.
Looking at the diff of the VMR comparing when this was working to when this failed, nothing clearly stands out as the culprit. Could it possibly be caused by dotnet/sdk#42240? /cc @baronfel
The only thing I could see that could perhaps be triggering here is this change to how we forward 'empty' properties to MSBuild from the CLI. This is an odd property anyway - is there any insight into why it is empty?
cc @rainersigwald for thoughts here on MSBuild property syntax
This is an odd property anyway - is there any insight into why it is empty?
It's set by default in the application insights source. For source build, we want its value to be cleared. I don't have information on why we need it cleared.
potential workaround might be to set an explicit empty string value via -p:RelativeOutputPathBase=""
?
/p:RelativeOutputPathBase
with no =value
is not something we recognize on the MSBuild side, so yeah that change looks wrong to me.
Very odd - there were some tests in the SDK side that didn't pass until I changed that. I'll take a look at getting that fixed soon, then - @rainersigwald I'll ping you on that PR to make sure our understanding of the MSBuild property syntax is correct. In the meantime @mthalman can you try the explicit-quotes suggestion and see if that unblocks you?
ok, then we just have to wait until I can force the linked fix through SDK CI (which is being very intransigent on the .NET Framework leg).
Ok, the proposed fix just merged to main in the SDK.
Fixed with dotnet/sdk#43004