2016-06-13 102 views
2

我在Visual Studio中创建全新的.NET核心类库项目2015年 生成的类有评论:缺少“缺少建立农产品输出”选项

// This project can output the Class library as a NuGet Package. 
// To enable this option, right-click on the project and select the Properties menu item. In the Build tab select "Produce outputs on build". 

我有Visual Studio企业2015年更新2

但问题是我没有看到在项目设置这个选项: enter image description here

enter image description here

我在哪里可以得到这个选项?

回答

4

即使我在VS2015更新2中遇到了类似的问题。 在构建项目之后,我用nuget包作为输出,但现在在构建菜单中,我们没有看到选项“在构建时产生输出”。

我可以使用下面的步骤来获取NuGet包:

  1. 打开VS2015开发人员命令提示符
  2. 目录更改为项目的project.json位置
  3. 运行“DOTNET包“并且它在您的项目中创建了一个nuget包 project_folder/bin/debug
3

Pre-.NET Core RC2,您的代码被神奇地编译到内存中。这有时会造成问题,因此您可以选择产生物理输出。

我没有任何证据可以将您链接到现在,但我知道据说这导致了比它值得的更多的问题,并且RC2仅编译到磁盘;因此该选项不再可用。

您看到的测试可能从项目模板中遗留下来,或者在RC1中启动的项目现在已升级到RC2。