NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe):
dotnet --version => 2.0.0-preview2-006479
VS version (if appropriate): 15.3 preview3 [26615.0.d15rel]
OS version (i.e. win10 v1607 (14393.321)): Win7 SP1
Worked before? Unknown
Repro app: NetRef.zip
Result:
Error NU1201 Project ClassCoreSdk is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Project ClassCoreSdk supports: net461 (.NETFramework,Version=v4.6.1)
/cc @rrelyea @davidfowl @Eilon @muratg
Let's understand and fix in post V15.3P3/CLI2P2.
@anurse - let us know if you think this is a V15.3P3/CLI2P2 blocker.
I think we can avoid having it for CLI2P2. It only affects .NET Framework projects using the new SDK-based project system, which is rare, since existing projects will use the older project system.
This is because packages.config projects do not check compatibility during restore. Which is by design.
Build still fails for that scenario.
Hi,
what's the story about this scenario, is it going to be supported ?
Thanks
@anurse you might think it's rare, but we have a 700 project solution, and converting over existing libraries to .netstandard, so I have 45 errors of NU1201, so not so rare for me. As others move to the new format or create .netstandard projects then this will increase. @rrelyea if it is by design, what is the workaround?
EXPECTED: Successfully added reference since they are both support .NET Standard 2.0
ACTUAL: Error NU1201 (same as OP)
Since they both support .NET Standard, there has to be a way to reference each other, right?
I have hit this too trying to migrate existing project to .NET standard and the new project system. If I have old-school project file I can reference the net461 project from the .NET Standard class library if I use the new format I get the NU1201 error. Anyone found a workaround?
Folks, thanks for your feedback! This issue appears to be identical to https://github.com/dotnet/standard/issues/481
Please see that issue for workarounds and plan for the future.
I have one class library project as my repository layer that in .netcore 2,0 framework and i am consuming this dll in Azure function project and its giving issue below
Severity Code Description Project File Line Suppression State
Error NU1201 Project Gamification.Services is not compatible with net461 (.NETFramework,Version=v4.6.1). Project Gamification.Services supports: netcoreapp2.0 (.NETCoreApp,Version=v2.0) TurnamentTimerFunctionApp E:\SportsFoundation\TurnamentTimerFunctionApp\TurnamentTimerFunctionApp.csproj 1
can anyone help
Most helpful comment
@anurse you might think it's rare, but we have a 700 project solution, and converting over existing libraries to .netstandard, so I have 45 errors of NU1201, so not so rare for me. As others move to the new format or create .netstandard projects then this will increase. @rrelyea if it is by design, what is the workaround?