visual-studio-2015 - 如何从 .Net Core RC2 类库创建 NuGet 包

标签 visual-studio-2015 nuget .net-core-rc2

我在 Visual Studio 中有一个包含 12 个项目的解决方案。我想从 Visual Studio 创建一个 nuget 包,但似乎缺少来自 RC1 的“生成输出”。

我可以继续创建一个脚本,该脚本转到每个文件夹并调用“dotnet pack”,但是 Visual Studio 中是否有我缺少的选项来执行此操作?

最佳答案

将此添加到您的 project.json文件:

"scripts": {
  "postcompile": [
    "dotnet pack --no-build --configuration %compile:Configuration%"
  ]
}

这将运行 dotnet pack命令,它将编译后生成的构建输出打包到 NuGet 包中。欲了解更多信息,请参阅 this .

我不确定如何只在 Release模式下执行此操作,所以我问了这个问题 here .

更新

根据另一个问题更新了答案。

关于visual-studio-2015 - 如何从 .Net Core RC2 类库创建 NuGet 包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37464874/

相关文章:

xamarin - 如何将 Xamarin.Forms 更新到最新版本?

visual-studio - 内部 NuGet 服务器无法访问

.net-core - 在线程中找不到 Abort 方法

asp.net-core - 在 "Development"环境中运行ASP.NET Core应用程序

f# - "Target F# Runtime"变灰 - 为什么?

c# - 进入 Visual Studio 2015 链接项目中的 (F11) 异步代码不起作用 - 如何修复

c++ - 构建 visual studio 后关闭窗口

c# - NuGet 找不到现有包

visual-studio - 如何修复 Visual Studio 2015 中引用的 netstandard1.5 库项目的智能感知?

angular - 如何使用 angualr2 和 typescript 将图像上传到 azure 存储 blob