Invoke a publish from msbuild for visual studio 2012

前端 未结 2 1230
[愿得一人]
[愿得一人] 2021-02-07 18:49

For VS2010 and before I was utilizing Web Deployment Projects (WDP) to help package my website for production deployment. I had a MSBuild script that compiled the solution in r

相关标签:
2条回答
  • 2021-02-07 19:09

    It appears that there are now some other options for publishing from the command-line. Specifically something along the lines of the following seems possible now with some RC updates to Visual Studio 2012.

    msbuild mywap.csproj /p:DeployOnBuild=true;PublishProfile=MyProfileName
    

    For more details check out this post by Scott Hanselman and check out the section on Publishing.

    0 讨论(0)
  • 2021-02-07 19:11

    I wasn't able to get the publish to run, but looking at the output from Visual Studio I think I have found an alternate solution. Turns out the obj\Release\AspnetCompileMerge folder has a deployable and clean version of the project. It contains byte identical files to the final output folder.

    I did have to change my msbuild script to include the DeployOnBuild option...

    <MSBuild Properties="Configuration=Release;DeployOnBuild=True;" 
             StopOnFirstFailure="true" 
             Projects="$(BuildDirectory)\BigWave.ALL.sln"></MSBuild>
    
    0 讨论(0)
提交回复
热议问题