[英]Why is NuGet.exe pack ignoring the Configuration=Release parameter?
使用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.
为什么?
经过反复试验,我弄清楚了。 指出不同?:
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'.
是的,OutputDirectory参数路径末尾的反斜杠导致其选择Debug而不是Release。 难怪我花了四个小时才将其从失败的TFS Nuget Packager步骤缩小到缩小范围。 不好笑。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.