如何打包在 CSProj 文件中具有 Nuget 规范的 .NET Standard NuGet 包而不重建它?
\n\n我有一些自动化需要在构建步骤和打包步骤之间运行,这些自动化与构建过程本身分离,并且不应该是与任何项目相关的构建事件。
\n\n当我尝试使用 nuget CLI 时,它失败并显示以下内容:
\n\nError NU5012: Unable to find \'bin\\Debug\\LibraryNuGetExample\\bin\\Debug\\\'. Make sure the project has been built.
这没有任何意义,因为那不是构建输出文件夹!正确的输出文件夹是bin\\Debug\\**——我不明白为什么它要寻找我没有在任何地方指定的目录映射。
我尝试使用这个,但它重建了,我绝对不想要;只是nuget pack:
MSBuild LibraryNuGetExample.csproj /t:pack
所以我要么需要知道如何,
\n\nLibraryNuGetExample.csproj
<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)