0

I am using the batch script below to build a solution file

set BUILD_PATH=%CD%

call "C:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools\vsvars32.bat"

devenv /clean Release "%BUILD_PATH%\Source\Dotnet\WebService\OPALController\OPALController.sln"

devenv /rebuild Release "%BUILD_PATH%\Source\Dotnet\WebService\OPALController\OPALController.sln

I was searching for a command to publish, since devenv /publish is not working

Is there any other way publish the artifacts?

Soufiane Hassou
  • 15,973
  • 2
  • 36
  • 71
Gopinath
  • 21
  • 2
  • You may want to consider Web Deploy (MSDeploy). See http://stackoverflow.com/questions/3097489/how-to-publish-web-with-msbuild. – jrummell Jun 13 '12 at 19:58

1 Answers1

0

I think you can add a Visual Studio 2010 Web Deployment Project to your solution and then publish using that.

If you follow the directions found here, but instead of using the TeamCity Build Runner you call MSBuild directly from your batch file you might be able to publish using the /p:Configuration=Deployment switch.

So basically your steps would be:
1) Download and install the Visual Studio 2010 Web Deployment Projects
2) Add a web deployment project to your solution
3) Create a "Deployment" configuration for your project(s) as outlined in the article
4) Call MSBuild from your script to compile your solution with the /target:REBUILD and /p:Configuration=Deployment switches

ScottieMc
  • 585
  • 7
  • 15