Invoke a publish from msbuild for visual studio 2012

╄→гoц情女王★ 提交于 2019-12-03 05:35:14

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.

John Livermore

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>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!