Compatibility between .Net Core 2.0 and .Net Framework 4.7

3

I am creating some general purpose libraries (dll's), to be reused in .Net Core 2.0 and .Net Framework 4.7 projects. I want to have .Net Core projects in linux and .Net Framework 4.7 projects for Windows. A library developed with .Net Core 2.0 can be used in .Net Framework 4.7 projects normally?

    
asked by Edvaldo Silva 20.08.2017 в 23:12
source

1 answer

3

What you need is a library that targets .NET Standard , not .NET Core .

.NET Standard is a specification that various frameworks can implement.

In the case of .NET Standard 2, it is supported by the following frameworks or superior versions:

  • .NET Core 2.0
  • .NET Framework 4.6.1
  • Mono 5.4
  • Xamarin.iOS 10.4
  • Xamarin.Mac 3.8
  • Xamarin.Android 7.5
  • Universal Windows Platform vNext (Does not yet support .NET Standard 2.0)

In turn, a library created in .NET Standard can be referenced by those frameworks or higher versions.

However, the best thing to do is to point to the lowest possible version you can aim for, in this way your library will be compatible with more platforms and previous versions of those mentioned.

For more information on the compatibility table, see: .NET Standard - .NET implementation support

    
answered by 20.08.2017 / 23:58
source