title: How do I get Visual Studio 2010 to pass a variable to MSBuild?
body: <p>I have built a custom msbuild deploy.targets file that allows me to publish the resulting binaries to a directory that I specify on the command line.  What that means is that if I run</p>
  
  <p>$>msbuild /p:DestServer=\myserver\final-dest</p>
  
  <p>then my project will be compiled, and the resulting *.dlls will be copied to a staging instance - in this case the directory final-dest on myserver.  I want this functionality because when I do a compile for good, I want a copy of the *.dlls in that directory, but I also want them local.</p>
  
  <p>Here's my issue - I'd really like to not have to issue that from the command line. When I choose the Release Build Configuration (Project | Properties | Build), I'd like to be able to specify the /p:DestServer=\myserver\final-dest as an argument that msbuild would use <em>as it does its normal build</em>.  </p>
  
  <p>Where do I specify this?</p>
  
  <p>In Project Properties | Build Events, I could specify pre-build or post-build events - but isn't this "part of the build" events?</p>
  
  <p>Ideally, if someone could give me the menu sequence in Visual Studio 2010, I'd appreciate it.</p>