title: Publish ASP.NET MVC 2 application from command line and Web.config transformations
body: <p>Good day!</p>
  
  <p>I've found this solution here: <a href="https://stackoverflow.com/questions/4029541/vs2010-web-publish-command-line-version-of-file-system-deploy">VS2010 Web Publish command line version of File System deploy</a></p>
  
  <pre><code>C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe 
  .\MyProject.csproj /p:Configuration=Release;DeployOnBuild=True;PackageAsSingleFile=False;outdir=c:\_OuputDir\
  </code></pre>
  
  <p>But it seems that Web.config transformations are not performed.</p>
  
  <p>May be there is better\cleaner way to duplicate "Publish Web" VS2010 dialog?</p>
  
  <p><strong>Update: The answer which is marked is the shortest command-line to perform publish, that I've found so far. Web.config transformations ARE applied, but connection strings are treated differently, here is a <a href="http://forums.asp.net/p/1569934/4043217.aspx" rel="nofollow noreferrer">description\workaround</a></strong></p>