Skip to content

Instantly share code, notes, and snippets.

@tdavisjr
Created April 30, 2016 05:31
Show Gist options
  • Save tdavisjr/77a8e861499811c951f5715d8a351254 to your computer and use it in GitHub Desktop.
Save tdavisjr/77a8e861499811c951f5715d8a351254 to your computer and use it in GitHub Desktop.
msbuild command line publish
VS2012+ have these featured built in
msbuild ProjectFile.csproj /p:Configuration=Release ^
/p:Platform=AnyCPU ^
/t:WebPublish ^
/p:WebPublishMethod=FileSystem ^
/p:DeleteExistingFiles=True ^
/p:publishUrl=c:\output
Or if you are building the solution file:
msbuild Solution.sln /p:Configuration=Release ^
/p:DeployOnBuild=True ^
/p:DeployDefaultTarget=WebPublish ^
/p:WebPublishMethod=FileSystem ^
/p:DeleteExistingFiles=True ^
/p:publishUrl=c:\output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment