-
Notifications
You must be signed in to change notification settings - Fork 252
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 pack should catch incorrect omitting of the dot in version numbers #9215
Comments
With the first half of net5.0 tfm work (#9089) that was just merged into dev, we treat net5.0 and later as "netcoreapp" internally, which like netstandard, by default adds dots into the version when writing them down in shortfoldername, etc... Like netcoreapp and netstandard, we don't currently warn for any use of dotless versions (net50). We could consider doing some sort of warning in these scenarios:
|
1 and 2 sound good to me. The key is not to warn for |
I would've never omitted the dots in "TargetFrameworks" of @rrelyea, a question about adding dots for developer: would it might bring problems? For example, how should the pack tool add the dots correctly for the TFM It would be great if we don't warn against the exsiting code targeting IMHO, I suggest that we:
|
Both |
current status: I'm working on adding warnings based on all the places in a nuspec where you might have some kind of TFM, which is a bit more than what I expected this to involve, so I'm having to take extra time to get that in. |
Awesome. Thanks for getting this done! 💜 |
For .NET 5, we're going to reuse the existing
net
moniker. Due to our new versioning scheme (fixed schedule, major bump every year) we're only five years away from .NET 10. Developers might accidentally saynet10
when they really meantnet10.0
. We're planning to follow in the footsteps of .NET Core where project files will generally use a dot, even when it's not necessary (e.g.net5.0
) but of course this won't prevent humans from dropping the.0
either inadvertently or for aesthetics.It was suggested to handle this as part of NuGet pack.
There are several ways to deal with that:
net5.0
(regardless of whether there is an OS flavor or not)The (1) is more correct but will cause a lot of noise, especially in .NET Framework projects where the ambiguity is irrelevant as the platform will remain at 4.x forever. So my preference would be something more targeted. Not sure (2) is the best way to address that but it seems to hit the sweet spot.
The text was updated successfully, but these errors were encountered: