title: Visual Studio: Pass Arguments to an Executable in the Compiler Post-Build Events
body: <p>I'm trying to run an executable to change my application configuration in the post-build events in visual studio. Depending if the configuration is Debug or Release, I want to pass arguments to my executable in order to execute my configuration changer correctly. Here is what I've done:</p>
  
  <pre><code>if $(ConfigurationName) == Release 
  (
  "$(ProjectDir)ConfigurationGenerator\ConfigurationGenerator.exe" Release $(OutDir)applicationConfiguration.config 
  )
  
  if $(ConfigurationName) == Debug 
  (
  "$(ProjectDir)ConfigurationGenerator\ConfigurationGenerator.exe" Debug $(OutDir)applicationConfiguration.config
  )
  </code></pre>
  
  <p>So, the "Debug" and the "Release" are the argument #1 and the "$(OutDir)applicationConfiguration.config" is the argument #2 in this case. On each time that I try to run my applicatoin, it crashes the build and it returns me in the error lists window that my application stopped with the exit code 3. Any Idea?</p>