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

NuGet.org reports TFMs incorrectly #2719

Closed
yishaigalatzer opened this issue Oct 6, 2015 · 6 comments
Closed

NuGet.org reports TFMs incorrectly #2719

yishaigalatzer opened this issue Oct 6, 2015 · 6 comments
Assignees

Comments

@yishaigalatzer
Copy link

by @jamesqo

I've run into a bug under the new ASP.NET 5 project.json format where the package version will be listed as Windows 0.0 (example) when uploaded to the website. Steps to reproduce:

1.

cd ~
git clone -b nuget-snapshot https://github.com/jamesqo/enu.git

2. Change the project.json package ID to a different name
3. Open the solution in Visual Studio and build
4. Upload it to nuget.org and the supported versions will be:

  • DotNET 5.0
  • .NETFramework 4.5
  • Windows 0.0
@maartenba
Copy link
Contributor

Found the issue in NuGet.Core, more specifically this method: https://github.com/NuGet/NuGet2/blob/dev/src/Core/Utility/VersionUtility.cs#L208

The NuGet package contains a folder name "win" which is passed to VersionUtility.ParseFrameworkName and returns Windows,Version=0.0.

Possible fixes:

  • Update the client to return a more meaningful version number for this
  • Update the ParseFrameworkName method to make use of the target framework mappings defined in VersionUtility (using the NormalizeFrameworkName method`

My guess would be the latter option is the way to fix this.

Proposed fix: NuGet/NuGet2@99e8944#diff-429cfdb033034ab032490b1e3ab4306eR310 (test: NuGet/NuGet2@99e8944#diff-f9c7c98c3d85f453f20ab6f5895e29baR1326)

Unfortunately, this proposed fix breaks 8 existing tests. @yishaigalatzer Please reassign this issue to someone who has a notion of possible consequences of making this change in NuGet.Core.

Would it make sense to update the gallery side to show a nice label here instead of updating NuGet.Core?

@yishaigalatzer
Copy link
Author

Lets update the gallery, and work with @emgarten on the core fix.

Going forward we need to start thinking about getting rid of nuget.core dependency in the gallery, we are almost there in the client

@maartenba
Copy link
Contributor

What should the gallery display for this one? Just "Windows"? "NETCore"?

@maartenba
Copy link
Contributor

Relates to #2720

@maartenba
Copy link
Contributor

@jamesqo @yishaigalatzer What should the gallery display for this one? Just "Windows"? "NETCore"? Other?

@jamesqo
Copy link

jamesqo commented Oct 9, 2015

@maartenba Probably Windows, you don't want people getting confused because they think a ".NETCore" package should be compatible with their .NET Core library.

@maartenba maartenba mentioned this issue Oct 9, 2015
7 tasks
@maartenba maartenba self-assigned this Oct 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants