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

netcoreapp2.0 is not compatible with netstandard2.0 ? #1728

Closed
srayuws opened this issue Nov 13, 2017 · 3 comments
Closed

netcoreapp2.0 is not compatible with netstandard2.0 ? #1728

srayuws opened this issue Nov 13, 2017 · 3 comments

Comments

@srayuws
Copy link

srayuws commented Nov 13, 2017

Hi ,
I have 3 trivial projects here:

  • CommonLib.csproj with target netstandard2.0
  • OldImplement.csproj with target v4.7
  • NewImplement.csproj with target newcoreapp2.0

Here is the problem:

It works fine if I reference the OldImplement in the CommonLib, everything works find.

But when i try to change the referenced project from the OldImplement to the NewImplement, I cannot build the CommonLib. And here is the error I got when I run dotnet build for CommonLib:

error NU1201: Project NewImplement is not compatible with netstandard2.0 (.NETStandard,Version=v2.0). Project NewImplement supports: netcoreapp2.0 (.NETCoreApp,Version=v2.0)

I have .Net CLI 2.0.2 installed.

My questions is: is this error by design, or it is possible to reference a netcoreapp project in a netstandard library?

@srayuws srayuws closed this as completed Nov 13, 2017
@odytrice
Copy link

odytrice commented Feb 7, 2018

Why was this closed? I have the same problem on a build server. Could it be that the right SDK is not installed?

@odytrice
Copy link

odytrice commented Feb 7, 2018

Turns out I was making a netstandard2.0 project depend on netcoreapp2.0 application

@srayuws
Copy link
Author

srayuws commented Feb 9, 2018

Hi @odytrice . The answer I got is: For new libraries, they should be implemented as netstandard. netcores and netfx could both reference netstandard projects, but not reverse. And everyone could reference netfx projects is for historical compatibility.

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

2 participants