How can I resolve the error: “The command […] exit

2020-02-24 05:17发布

I've read around many questions but I've not been able to find the right answer for me.

As I try to compile a project in VS2012 I have this result:

The command "....\tools\bin\nuget pack Packages\Lib.Html.nuspec - OutputDirectory ....\bin\Zip\Packages -NoPackageAnalysis" exited with code 1.

I looked for the line of code in my .csproj file, where the error should be, and there is:

<Exec Command="$(ProjectDir)..\..\tools\bin\nuget pack $(ProjectDir)Packages\Lib.Html.nuspec -OutputDirectory $(OutputPath)Packages -NoPackageAnalysis" />  

What am I doing wrong?

[EDIT] Launching the Debug of that project and ignoring "building errors", I have a new alert:

"Visual Studio cannot start debugging because the debug target '[project.exe path]' is missing. Please build the project and retry, or set OutputPath and AssemblyName properties appropriately to point at the correct location for the target assembly."

8条回答
家丑人穷心不美
2楼-- · 2020-02-24 06:01

For me, in VS 2013, I had to get rid of missing references under References in the UI project (MVC). Turns out, the ones missing were not referenced.

查看更多
【Aperson】
3楼-- · 2020-02-24 06:03

Right click project -> Properties -> Build Events

Remove the text in Post-build event command line text block

查看更多
登录 后发表回答