-
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
Misleading error when .NET Standard version is not known to be compatible with target framework #5818
Comments
Setting MinClientVersion in the nuspec file will help avoid this: For NETStandard 2.0 the MinClientVersion would be 3.6.0 which is the lowest version on VS 2015 supporting that framework. |
cc @bricelam, I think you had similar thoughts about MinClientVersion. |
@emgarten would setting MinClientVersion to 3.6 help if I am running on a 4.x version of NuGet that is not the latest and doesn't know about .NET Standard 2.0 list of compatible TFMs and I actually need to update VS? |
@divega no, unfortunately there isn't a way to define multiple ranges of allowed clients. Example: >= 3.6.0 && < 4.0.0 or >= 4.3.0 We have been investigating how to improve this, and if we could allow for these ranges or add a capability check to the nuget client, but it doesn't exist currently. |
@emgarten thanks. In that case I would still like to propose the error is improved. What we are seeing right now is customers complaining to package authors that their libraries targeting .NET Standard 2.0 are not supported in .NET Framework 4.6.1 and up, when the reality is that they are. |
@divega - are your packages that are targeting NetStandard 2.0 using MinClientVersion of 3.6? If not, please do that, as the best way to help get old nuget clients to update. @divega - how would you suggest we improve the error? @karann-msft - can we please work on a doc issue to make sure that our docs provide guidance for NetStandard 2.0-only package publishers use MinClientVersion=3.6.0? |
I have created dotnet/efcore#9668 for this.
It depends on whether it would make sense for NuGet client to handle .NET Standard versions that it doesn't know about in a special way. E.g. if NuGet client encounters the condition under which it now returns this error, but it finds that the package targets any version of .NET Standard that it doesn't know about, it could return an error saying something like this:
Otherwise I would go with modifying the existing error to say something like this:
|
@rrelyea we discussed add MinClientVersion 3.6 to our packages as a partial mitigation for this issue. Before we do it, we need to know for certain that no version of NuGet 2.x will ever add support for .NET Standard 2.0. Is that guaranteed? |
@divega - We are not planning on shipping another update to 2.12. It was determined out of scope in discussions with NetStandard and NuGet folks at the beginning of the NS2 effort. |
Right now, we don't plan to update the message. But we will listen to feedback over the next several months. |
With NuGet 3.6 I get a strange error message in VS2015 with NuGet 3.6 when trying to update the Firebird Provider which sets minClientVersion="3.6" telling me that I need NuGet 3.6.0 while I have 3.6.0-RTM-2511 installed. So I have the required version in 2015 but setup still fail. Is this a NuGet 3.6 bug for VS2015? |
@MagicAndre1981 open a new issue for that please. |
…nd tags. Added min Client version for Nuget 3.6. This is partialy mitigate upgrade issues as only Nuget versions >= 3.6.0 && < 4.0.0 or >= 4.3.0 support .net standard NuGet/Home#5818 (comment).
…, projectUrl, and tags. updated the nuspec files adding summary, release Notes, projectUrl, and tags. Added min Client version for Nuget 3.6. This is partialy mitigate upgrade issues as only Nuget versions >= 3.6.0 && < 4.0.0 or >= 4.3.0 support .net standard NuGet/Home#5818 (comment).
…nd tags. Added min Client version for Nuget 3.6. This is partialy mitigate upgrade issues as only Nuget versions >= 3.6.0 && < 4.0.0 or >= 4.3.0 support .net standard NuGet/Home#5818 (comment).
…, projectUrl, and tags. updated the nuspec files adding summary, release Notes, projectUrl, and tags. Added min Client version for Nuget 3.6. This is partialy mitigate upgrade issues as only Nuget versions >= 3.6.0 && < 4.0.0 or >= 4.3.0 support .net standard NuGet/Home#5818 (comment).
…nd tags. Added min Client version for Nuget 3.6. This is partialy mitigate upgrade issues as only Nuget versions >= 3.6.0 && < 4.0.0 or >= 4.3.0 support .net standard NuGet/Home#5818 (comment).
…, projectUrl, and tags. updated the nuspec files adding summary, release Notes, projectUrl, and tags. Added min Client version for Nuget 3.6. This is partialy mitigate upgrade issues as only Nuget versions >= 3.6.0 && < 4.0.0 or >= 4.3.0 support .net standard NuGet/Home#5818 (comment).
On the first few days after we released .NET Standard 2.0 (and a wave of new packages that target it) we have seen several customer reports for this kind of error:
We believe a significant number of customers are now seeing this error because they have older NuGet client or dotnet CLI bits that are not aware of .NET Standard 2.0 and its compatible TFMs.
For these customers, the recommendation in the error message is misleading and ideally we would be prompting them to upgrade NuGet client or dotnet CLI.
Presumably, this can still happen again in the future:
The text was updated successfully, but these errors were encountered: