Using the .NET Core Library in the .NET 4.5.2 Console Application

I have two projects: one project is built on .NET Core, and the other is on the regular .NET Framework 4.5.2.

I want to know how I can use my .NET Core cass library in my .NET Console application.

Here is my project.json:

{
  "version": "1.0.0-*",

  "dependencies": {
    "NETStandard.Library": "1.6.0",
    "NLog.Web.AspNetCore": "4.3.0",
    "System.Xml.XmlSerializer": "4.0.11"
  },

  "frameworks": {
    "netstandard1.6": {
      "imports": "dnxcore50"
    },
    "net452": {}
  }
}

I tried to include the project as a normal link. But after rebuilding the solution, the console application still does not receive the .NET Core library as a reference.

+4
source share
1 answer

Visual Studio 2017 ; Visual Studio 2015 ( 3). .NET Core, VS 2017.

, , VS 2015:

  • dotnet pack NuGet . net452 project.json, .NET Framework 4.5.2. .

  • DLL, . bin/net452/YourLibrary.dll. , .

+2

Source: https://habr.com/ru/post/1668258/


All Articles