Home Ask Login Register

Developers Planet

Your answer is one click away!

Agile February 2016

How to automate build (.NET Services)

I am trying to automate build process (not Continuous Integration):

  1. Get the code from TFS.
  2. Compile and create build package.
  3. Push the code to a desired shared location.

Should I consider using PowerShell or will msbuild through Command Prompt suffice?


chief7 February 2016

Either will work. We use TFS build definitions to execute MSBuild and MSDeploy.exe commands for our deployments. You can build via the commandline with:


Then use MSDeploy to package the deployment and deploy:

msdeploy.exe -verb:sync -source:dirPath="C:\source\myProject\bin\Release" -dest:package=c:\package.zip
msdeploy.exe -verb:sync -source:package=C:\package.zip -dest:iisApp="Site1/App1" -enableRule:DoNotDeleteRule

Post Status

Asked in February 2016
Viewed 2,565 times
Voted 7
Answered 1 times


Leave an answer

Quote of the day: live life