Problems when referencing a classlibrary of .net framework core - C #

1

I need to reference a .NET class library in my WPF layer which is a .NET Framework layer.

But it bursts a compilation error saying that it can not be referenced.

The error message is:

  

The project "ProjectName.csproj" is destined 'netcoreapp2.0'. It can not be referenced by a project that targets 'NETFramework, Version = v4.6.1'

How do I resolve this problem?

    
asked by anonymous 10.01.2018 / 09:45

1 answer

3

It does not. Both frameworks are different and incompatible things .

For this there is .NET Standard, you can have class target as .NET Standard and this will make it use both in .NET Core projects and .NET Framework projects.

You can read more in the .NET Standard documentation .

This question may also help: What's the difference in creating a class project libray (.net framework) and class library ( .net standard) on VS2017?

    
10.01.2018 / 12:08