Referencing Library in ASP.NET Core 1.0 (vNext)

后端 未结 3 2209
离开以前
离开以前 2021-02-19 11:44

I am learning ASP.NET Core 1.0 (vNext). With that in mind, I have a solution that is structured like this:

MySolution
  src
    MyLibrary
      MyClass.cs
               


        
3条回答
  •  北恋
    北恋 (楼主)
    2021-02-19 12:20

    You don't have to publish the package to NuGet if you don't want to share it with other people/projects outside of your solution. You can just reference the package directly from source.

    However, if that still doesn't work for you then you have three options:

    1. Internalize using Roslyn. Example: project.json and the actual code
    2. You can reference the sources directly. Example project.json
    3. Create a build time dependency. Example project.json and actual code for the package

提交回复
热议问题