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

Version 2.4.x is not compatible with net451 - version 2.3.x is #388

Closed
djeec opened this issue Jan 11, 2019 · 11 comments
Closed

Version 2.4.x is not compatible with net451 - version 2.3.x is #388

djeec opened this issue Jan 11, 2019 · 11 comments

Comments

@djeec
Copy link

djeec commented Jan 11, 2019

When trying to add package version 2.4.x to my application, I get
NU1202: Package CommandLineParser 2.4.3 is not compatible with net451 (.NETFramework,Version=v4.5.1). Package CommandLineParser 2.4.3 supports: netstandard2.0 (.NETStandard,Version=v2.0)

Version 2.3.x works no problem.

@glennawatson
Copy link

Minimum version for adopting .NET Standard 2.0 is .NET 4.6.1

Also Microsoft has dropped support for 4.5.1 now https://blogs.msdn.microsoft.com/dotnet/2015/12/09/support-ending-for-the-net-framework-4-4-5-and-4-5-1/

@gurru68
Copy link

gurru68 commented Jan 15, 2019

Hello,
I get an error message also when trying to update to 2.4.3 under .NET 4.6.1 (via NUGET):

Could not install package 'CommandLineParser 2.4.3'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.6.1', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

@glennawatson
Copy link

what version of visual studio etc you running? .NET 4.6.1 is compatible with .NET Standard 2.0 libraries but I could imagine you getting that error if your Nuget is out of date or something.

@gurru68
Copy link

gurru68 commented Jan 15, 2019

I'm running VS 2015 Pro / NUGET 3.5.0.1484. I also tried to update NUGET to the latest available for VS2015 (3.6.0.2511) but I still get an error.

I notice that the version 2.3.0 NUGET package declares its dependencies (1st screenshot) while version 2.4.3 does not.
capture
capture2

@glennawatson
Copy link

https://github.com/dotnet/cli/issues/6739

They mention in that problem there is a compatibility pack for .net standard 2.0 and VS 2015

@kellcomnet2
Copy link

kellcomnet2 commented Jan 17, 2019

I agree that the missing dependencies are why the package is being offered as an updated package. If minimum version is set the nuget will not offer it.

It should be mentioned that once the dependency issue is fixed, you will have to go into nuget.org and remove the 2.4.x versions that are missing the dependency info.

@ericnewton76
Copy link
Member

Hmmm, thats odd its missing at least the base dependency of NetStandard 2.0

I'll look into this

@ericnewton76
Copy link
Member

ericnewton76 commented Jan 17, 2019

Here's what I see when I downloaded the artifacts from the build server:
(Nuget package explorer)
image
Correctly shows NetStandard 2.0 dependency.

Here's Nuget Package Explorer directly accessing the package from the Nuget.org feed:
image
Correctly shows NetStandard 2.0 dependency.

Here's what I see in VS2017:
image
So I believe part of this is (as usual) another inconsistency in Nuget itself.

I find it amazing that the Nuget team is directly tying their pos package manager to visual studio versions, a luxury that virtually no other package manager has ever tried to enforce. Sorry, I get upset when discussing Nuget, I've gone several rounds with those fellas.

Sorry, I'm not able to assist here... I do believe, as mentioned above, for VS2015 you'll need to install that compatibility pack as mentioned. We do have another "restore net45" issue #388 thread running, and a proposed PR #387 to deal with it.

@ericnewton76
Copy link
Member

That being said above, theres a lot of code in the library that uses type reflection code (kinda important here) that appears to not work below 4.5.1

@Gusi
Copy link

Gusi commented Feb 1, 2019

What about 4.6? Same problem with that .NET version

@MonkeyAlex
Copy link

MonkeyAlex commented Apr 25, 2019

Successfully installed this package after upgrading .Net framework from 4.5.2 to 4.6.2.

Should the Readme be updated to read "Compatible with .NET Framework 4.6.x+"?

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

8 participants