How to add a .NET class library link to a vNext project

I have an ASP.Net 5 project in which I want to reference a number of .Net class libraries. However, I had a lot of problems with this.

My project directory looks something like this:

WebProject
  NetLibrary1
  NetLibrary2
  NetLibrary3
  src
    Web Project Code
  wrap
    DevExpress.Data.v14.1
      project.json
    .
    .
    NetLibrary1
      project.json

The wrap folder contains a folder for each DLL referenced in the web project, and inside each of these folders is the project.json file, which I think wraps the DLL in a fake Nuget package for the vNext project to consume.

My problem is that I did not seem to be able to successfully migrate 2 of my NetLibrary projects so that my vNext project could reference them. I am trying to add links by right-clicking and placing the project names in my web project.json file as follows:

"frameworks": {
"dnx451": {
  "dependencies": {
    "NetLibrary1": "1.0.0-*",
    "NetLibrary2": "1.0.0-*"
  }
 }
}

, , : " NetLibrary1 >= 1.0.0 - *".

, , , .

!

+4
2

JimmyD

, , , DLL .

0

Foo.csproj Bar.xproj . Beta8, , .

  • Foo.csproj, : dnv wrap Foo.csproj.
  • , Foo/wrap/Foo/project.json. Visual Studio, Add -> Existing project -> project.json.
  • , Foo.xproj, Visual Studio, .
  • cmd Foo dnv restore.
  • 4) , Foo.xproj , Bar.xproj Foo.xproj.
  • cmd Bar dnv restore.
  • Bar.xproj

, .

+1

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


All Articles