Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotnet pack No Longer Correctly Parses Semicolon-Delimited Build Properties Starting in 6.0.301 #27319

Closed
wsugarman opened this issue Aug 20, 2022 · 3 comments
Assignees
Labels
untriaged Request triage from a team member

Comments

@wsugarman
Copy link

wsugarman commented Aug 20, 2022

Describe the bug

My CI pipelines add build properties via the CLI option -p and use a semicolon (;) as a delimiter between multiple key-value pairs.
E.g. dotnet pack MyProject.csproj -c Release "-p:Foo=bar;PackageVersion=1.2.3-baz"

However, upon updating my .NET SDK version in the global.json file from 6.0.300 to 6.0.400, I noticed that my package versions were incorrect. Looking into it more, it seems like this has been broken since 6.0.301.

To Reproduce

I've been testing this on .NET 6 projects using versions 6.0.300, 6.0.301, and 6.0.400 of the SDK. You're welcome to use my own OSS project which has a single global.json file at the root of the repository: https://github.com/wsugarman/sweetener/blob/main/src/Core/Sweetener/Sweetener.csproj, but it should reproduce in a new .NET 6 library template. Simply toggle between different versions of the .NET SDK.

Worked previously, but now doesn't >= 6.0.301

> dotnet pack MyProject.csproj -c Release "-p:Foo=bar;PackageVersion=1.2.3-baz"

Continues to work

> dotnet pack MyProject.csproj -c Release "-p:Foo=bar" "-p:PackageVersion=1.2.3-baz"

Further technical details

> dotnet --info
.NET SDK (reflecting any global.json):
 Version:   6.0.400
 Commit:    7771abd614

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.22000
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\6.0.400\

global.json file:
  Not found

Host:
  Version:      6.0.8
  Architecture: x64
  Commit:       55fb7ef977

.NET SDKs installed:
  2.1.818 [C:\Program Files\dotnet\sdk]
  3.1.422 [C:\Program Files\dotnet\sdk]
  5.0.408 [C:\Program Files\dotnet\sdk]
  6.0.108 [C:\Program Files\dotnet\sdk]
  6.0.300 [C:\Program Files\dotnet\sdk]
  6.0.303 [C:\Program Files\dotnet\sdk]
  6.0.400 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 3.1.28 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.28 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.28 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Download .NET:
  https://aka.ms/dotnet-download

Learn about .NET Runtimes and SDKs:
  https://aka.ms/dotnet/runtimes-sdk-info 
@dotnet-issue-labeler
Copy link

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.

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Request triage from a team member label Aug 20, 2022
@PleasantD
Copy link

Seems to be the same issue as #27059

@baronfel
Copy link
Member

We fixed this in 6.0.400-series builds. Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

3 participants