使用 nuget.exe 打包应用程序,我指定 Release 作为配置,但失败并显示“确保项目已构建”。因为它在 Debug 文件夹中查找,而不是在 Release 文件夹中查找:
NuGet.exe pack "C:\dev\Test\WpfApp1.csproj" -OutputDirectory "C:\dev\a\packages\" -Properties Configuration=Release
Attempting to build package from 'WpfApp1.csproj'.
Unable to find 'C:\dev\Test\bin\Debug\WpfApp1.exe'. Make sure the project has been built.
Run Code Online (Sandbox Code Playgroud)
为什么?
经过多次尝试和错误,我想通了。指出不同?:
NuGet.exe pack "C:\dev\Test\WpfApp1.csproj" -OutputDirectory "C:\dev\a\packages" -Properties Configuration=Release
Attempting to build package from 'WpfApp1.csproj'.
Packing files from 'C:\dev\Test\bin\Release'.
Run Code Online (Sandbox Code Playgroud)
是的,OutputDirectory 参数路径末尾的反斜杠导致它选择“调试”而不是“发布”。难怪我花了 4 个小时才从失败的 TFS Nuget Packager 步骤缩小范围。不好笑。
| 归档时间: |
|
| 查看次数: |
509 次 |
| 最近记录: |