sdk: Breaking change in response file parsing
Describe the bug
Since upgrading from SDK 6.0.300 to 6.0.301, the response file parsing logic has changed, where
-p:VSTestTestAdapterPath=".;C:\BuildAgent\plugins\dotnet\tools\vstest15"
used to work, but now shows an error:
dotnet build .\IPFX.UC.PresenceServer.sln @C:\BuildAgent\temp\agentTmp\1.rsp
Microsoft (R) Build Engine version 17.2.0+41abc5629 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1006: Property is not valid.
Switch: C:\BuildAgent\plugins\dotnet\tools\vstest15
For switch syntax, type "MSBuild -help"
To Reproduce
docker run -it --rm mcr.microsoft.com/dotnet/sdk:6.0.301 bash
mkdir repro
cd repro
dotnet new console
echo "-p:VSTestTestAdapterPath=\".;/opt/buildagent/plugins/dotnet/tools/vstest15\"" > params.rsp
dotnet restore repro.csproj @params.rsp
Exceptions (if any)
MSBUILD : error MSB1006: Property is not valid.
Switch: /opt/buildagent/plugins/dotnet/tools/vstest15
For switch syntax, type "MSBuild -help"
Expected
Determining projects to restore...
All projects are up-to-date for restore.
Further technical details
- Include the output of
dotnet --info
# dotnet --info
.NET SDK (reflecting any global.json):
Version: 6.0.301
Commit: 43f9b18481
Runtime Environment:
OS Name: debian
OS Version: 11
OS Platform: Linux
RID: debian.11-arm64
Base Path: /usr/share/dotnet/sdk/6.0.301/
Host (useful for support):
Version: 6.0.6
Commit: 7cca709db2
.NET SDKs installed:
6.0.301 [/usr/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.6 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.6 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
- The IDE (VS / VS Code/ VS4Mac) you’re running on, and its version N/A
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 33
- Comments: 18 (9 by maintainers)
Reopening this due to repro.
Good point, 6.0.305 and 6.0.402 should contain the fix. ‘and up’ was intended to mean ‘the higher feature bands’, which right now are 6.0.4xx and 7.0.1xx.
Issue present in 6.0.400.
Please don’t get me wrong, but I have to say, MS quality testing is appalling, not just in windows but in all products these days? This is on a brand new project (
dotnet new blazorwasm && dotnet publish -v detailed | grep -i "unrec"). I’d expect that at least to be tested. If this is the experience of someone testing the tech, doesn’t bode well for the project.Closing as resolved and should be released in 6.0.303 and onwards.
@janv8000 ~the MSBuild issue is not related.~ I must apologize for this - this issue is in fact related! The changes to the Option for MSBuild properties added a pathway where the MSBuild Property values weren’t being semicolon-escaped as they are in other parts of the codebase. That was the second key part of the one/two punch of this regression.
@Danielku15 thank you for reporting a second case. @dsplaisted yes, I agree that a second case is enough to investigate reverting the S.CL update that triggered this, and then looking at how to mitigate for 6.0.400 and beyond.
Note that this isn’t only a issue with that specific parameter or with semi-colons in strings alone.
Another .rsp reproduction:
Error:
@baronfel - can you list the exact version(s) it’s fixed in? “
6.0.300 SDKseries and up” nominally (logically?) includes6.0.400, which exhibits the problem.Closing this as we merged the servicing fix last week. This should be fixed in the October servicing release of the 6.0.300 SDK series and up.
TeamCity have addressed this issue with a solution found at https://github.com/JetBrains/teamcity-dotnet-plugin/issues/158#issuecomment-1157370284