title: Post-Build command exited with code 1 (trying to automatically generate NuGet packages)
body: <p>I hope someone can help me, I was trying to do following tutorial about automatic creation of nuget packages:</p>
  
  <p><a href="http://msdn.microsoft.com/en-us/vs2010trainingcourse_aspnetmvcnuget_topic2" rel="nofollow">http://msdn.microsoft.com/en-us/vs2010trainingcourse_aspnetmvcnuget_topic2</a></p>
  
  <p>I made following batch file:</p>
  
  <pre><code>@echo off
  ..\BUILD\NuGet\NuGet.exe pack .\defs.nuspec -OutputDirectory ..\BUILD\myPackages
  </code></pre>
  
  <p>I can run this file from explorer or shell without problems. When I try to call this batch from the Post_Build event handler of VS2010: (Post-Build event command line)</p>
  
  <pre><code>call "$(ProjectDir)CreateNuGetPackage.bat"
  </code></pre>
  
  <p>It always return: </p>
  
  <pre><code>Error   47  The command "call "C:\development\mysolution\myproject\CreateNuGetPackage.bat"" exited with code 1. 
  </code></pre>
  
  <p>Even if this path is right.</p>
  
  <p>I even try to make a .cmd file with the same content which also generated the NuGet package without problems but not within the Post-Build dialog. I've also tried to put the content of the bath in the Post-Build event dialog (as defined in the article):</p>
  
  <pre><code>C:\development\mysolution\myproject\..\BUILD\NuGet\NuGet.exe pack C:\development\mysolution\myproject\defs.nuspec -OutputDirectory C:\development\mysolution\myproject\..\BUILD\myPackages
  </code></pre>
  
  <p>And I'm still getting the same error... I really have no clue what can be going wrong, I hope someone can help me or give me an alternative way of generating such packages.</p>
  
  <p>Thanks!!</p>