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

Please clarify: How to separate Nuget tags in project file? #14073

Open
SetTrend opened this issue Jan 29, 2025 · 3 comments
Open

Please clarify: How to separate Nuget tags in project file? #14073

SetTrend opened this issue Jan 29, 2025 · 3 comments
Assignees
Labels
Category:Quality Week Issues that should be considered for quality week Functionality:Pack Priority:2 Issues for the current backlog. Type:Bug

Comments

@SetTrend
Copy link

SetTrend commented Jan 29, 2025

The .nuspec File Reference for NuGet reads:

tags

A space-delimited list of tags


The Visual Studio 2022 project file designer reads:
Image

Semicolon or space delimited? What's correct?

@microsoft-github-policy-service microsoft-github-policy-service bot added the missing-required-type The required type label is missing. label Jan 29, 2025
@nkolev92
Copy link
Member

nkolev92 commented Feb 6, 2025

Since tags don't accept spaces, it doesn't really matter.

tag1;tag2 becomes tag1 tag2 in the nuspec
tag1 tag2 becomes tag1 tag2 in the nuspec
tag1; tag2 tag3 becomes tag1 tag2 tag3 in the nuspec
tag1 tag2; tag3 becomes tag1 tag2 tag3 in the nuspec

@nkolev92 nkolev92 added Functionality:Pack Type:Bug and removed missing-required-type The required type label is missing. labels Feb 6, 2025
@SetTrend
Copy link
Author

SetTrend commented Feb 6, 2025

Thank you, @nkolev92, for enlightening me.

It seems the informational label in Visual Studio 2022 doesn't explain that fact.

In fact, I might enter My Export Package; My Import Package in a .NET project file and expect this to create exactly two tags: My Export Package and My Import Package in the NuGet package.

Also, using a "semicolon-delimited list of tags" implies that semicolons are no valid characters for NuGet package tags. Yet, are they?

Shouldn't the information either at learn.microsoft.com/nuspec#tags and/or in the Visual Studio informational label be amended to elaborate on the characters valid for NuGet package tags? E.g. the informational label could claim: "Whitespace is not allowed for any tag or keyword." or "Only … characters allowed for NuGet package tags." (e.g., UNICODE classes Ll, Lt, Lu, Nd, Nl, No …)

@nkolev92
Copy link
Member

nkolev92 commented Feb 6, 2025

semicolon is a common delimeter in msbuild world.

I think we can amend the docs and potentially VS to clarify how things work.

Fwiw, I'm not 100% certain if the whitespace restriction is a nuget.org thing or a more general thing.

@jeffkl jeffkl self-assigned this Feb 10, 2025
@jeffkl jeffkl added Priority:2 Issues for the current backlog. Category:Quality Week Issues that should be considered for quality week labels Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category:Quality Week Issues that should be considered for quality week Functionality:Pack Priority:2 Issues for the current backlog. Type:Bug
Projects
None yet
Development

No branches or pull requests

3 participants