Skip to content

Instantly share code, notes, and snippets.

@upzone
Forked from tdavisjr/cmdline-publish
Created December 29, 2018 17:54
Show Gist options
  • Select an option

  • Save upzone/ff477e6d0f6a357497f53e3d4c4c9780 to your computer and use it in GitHub Desktop.

Select an option

Save upzone/ff477e6d0f6a357497f53e3d4c4c9780 to your computer and use it in GitHub Desktop.

Revisions

  1. @tdavisjr tdavisjr created this gist Apr 30, 2016.
    17 changes: 17 additions & 0 deletions cmdline-publish
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    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