简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM