我正在学习 ASP.NET Core 1.0 (vNext).考虑到这一点,我有一个结构如下的解决方案:
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 project.json MyWebSite Startup.cs project.json我使用 dnu build 从命令行成功编译了 MyLibrary.我运行了生成 MyLibrary.1.0.0.nupkg 的 dnu pack.还有两个文件夹:dnx451 和 dnxcore50,它们都包含 MyLibrary.1.0.0.dll.我想在 MyWebSite 中使用 MyLibrary,但是,我很困惑.
I am successfully compiling MyLibrary from the command-line using dnu build. I ran dnu pack which generated MyLibrary.1.0.0.nupkg. There are also two folders: dnx451 and dnxcore50 which both contain MyLibrary.1.0.0.dll. I want to use MyLibrary in MyWebSite, however, I'm confused.
如果不想与解决方案之外的其他人/项目共享包,则不必将包发布到 NuGet.您可以直接从源代码中引用包.
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:
更多推荐
ASP.NET Core 1.0 (vNext) 中的引用库
发布评论