I have a Visual Studio 2010 MVC2 web application that I\'m building via the command line using Hudson. I\'d like to make Hudson publish a web output, so I added the DeployO
Further to the answer by Brian Hinchey, I found that I also required to append my msbuild batch call with the additional parameter VisualStudioVersion so that the correct version and path on the build agent (TeamCity in my case) to Microsoft.WebApplication.targets would be called. Without this parameter the web deploy and publish step was not completed and my batch completed successfully with a code 0 returned making analysis very difficult - even with the /verbosity flag appended to 'debug' the build. This point is made by SAYED IBRAHIM HASHIMI on his site: http://sedodream.com/2012/08/19/VisualStudioProjectCompatabilityAndVisualStudioVersion.aspx
The scenario for my case was that I had the Visual Studio compatibility enabled on my MVC web project so that I could open the project in VS2010 or 2012 (as Sayed notes in the above link) - so I'm dev'ing locally in VS2012 whereas the TeamCity build agent has the VS 2010 web build and deploy targets.