johnluke.laue johnluke.laue - 1 year ago 154
C# Question

Can you reference a .NET Core class library from a regular c# Class Library?

I have two class libraries. One is a C# Class Library (from Visual Studio 2015 -> New Project -> Installed -> Templates -> Visual C# -> Class Library). The other is C# Class Library (.NET Core) (from Visual Studio 2015 -> New Project -> Installed -> Templates -> Visual C# -> Class Library (.NET Core)).

I added a reference from my C# Class Library to my .NET Core Class Library, but it's not finding the namepsace when I try to do

using CoreClassLibraryNamespace;


Is it possible to reference a .NET Core library from a regular C# Class Library?

Answer Source

You can't reference a pure .NET Core library from a classic .NET project as of today. You can, however, create a Portable Class Library (template "Class Library (Portable)", aka PCL) with targets ".NET Framework 4.x" and "ASP.NET Core 1.0". The resulting library can be referenced from Core and classic projects.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download