相关疑难解决方法(0)

如何打包 .NET Standard NuGet 包而不重建它?

如何打包在 CSProj 文件中具有 Nuget 规范的 .NET Standard NuGet 包而不重建它?

\n\n

我有一些自动化需要在构建步骤和打包步骤之间运行,这些自动化与构建过程本身分离,并且不应该是与任何项目相关的构建事件。

\n\n

当我尝试使用 nuget CLI 时,它失败并显示以下内容:

\n\n

Error NU5012: Unable to find \'bin\\Debug\\LibraryNuGetExample\\bin\\Debug\\\'. Make sure the project has been built.

\n\n

这没有任何意义,因为那不是构建输出文件夹!正确的输出文件夹是bin\\Debug\\**——我不明白为什么它要寻找我没有在任何地方指定的目录映射。

\n\n

我尝试使用这个,但它重建了,我绝对不想要;只是nuget pack

\n\n

MSBuild LibraryNuGetExample.csproj /t:pack

\n\n

所以我要么需要知道如何,

\n\n
    \n
  1. 使用 MSBuid 仅打包而不构建具有某些当前未知选项的包
  2. \n
  3. 使用具有当前未知选项的 NuGet CLI 来打包它
  4. \n
  5. 我还没有考虑过其他一些聪明的事情:)
  6. \n
\n\n

LibraryNuGetExample.csproj

\n\n
<Project Sdk="Microsoft.NET.Sdk">\n\n  <PropertyGroup>\n    <TargetFrameworks>uap10.0;net45</TargetFrameworks>\n    <PackageId>LibraryForNuGetExample</PackageId>\n    <Authors>user name</Authors>\n    <Company>ACME</Company>\n    <Product>Library For NuGet Example</Product>\n    <Description>A test package to test …
Run Code Online (Sandbox Code Playgroud)

nuget nuget-package nuget-spec .net-standard

1
推荐指数
1
解决办法
914
查看次数

标签 统计

.net-standard ×1

nuget ×1

nuget-package ×1

nuget-spec ×1