Version 2.4.x is not compatible with net451 - version 2.3.x is
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.
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/
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.
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.
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.
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
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.
Hmmm, thats odd its missing at least the base dependency of NetStandard 2.0
I'll look into this
Here's what I see when I downloaded the artifacts from the build server:
(Nuget package explorer)
Correctly shows NetStandard 2.0 dependency.
Here's Nuget Package Explorer directly accessing the package from the Nuget.org feed:
Correctly shows NetStandard 2.0 dependency.
Here's what I see in VS2017:
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.
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
What about 4.6? Same problem with that .NET version
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+"?