簡體   English   中英

為什么NuGet.exe包會忽略Configuration = Release參數?

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM