How to build Visual Studio 2012 Publishing Profiles on a Build Server with MsBuild without installing Visual Studio 2012

佐手、 提交于 2019-12-03 03:47:06

问题


I read through many of the posts on here and never found a clear answer that worked. So after spending the time getting this to work, I figured I should post it.

Problem: The publishing profile would build on the server, but would not publish.

Solution:

  1. Make sure you installed Microsoft Windows SDK and .Net Framework 4

  2. From your client machine with Visual Studio 2012 update 2 installed, copy:

\Program Files(x86)\MSBuild\Microsoft\Visual Studio\v11.0\Web\
\Program Files(x86)\MSBuild\Microsoft\Visual Studio\v11.0\WebApplications\

To the same location on your server.

Then make a simple batch file:

"C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" /v:diag YOUPROJECT.sln /p:Configuration=Debug /p:DeployOnBuild=true /p:PublishProfile=YOURPROFILE

This is working for us on multiple build servers.

I hope this helps someone.

It seems insane to me that Microsoft hasn't provided a MSBuild update with all the publishing options. It seems to me that the command line tools are more important on the server....

Cheers


回答1:


Just moving Dave's solution into an answer.

Solution:

  1. Make sure you installed Microsoft Windows SDK and .Net Framework 4

  2. From your client machine with Visual Studio 2012 update 2 installed, copy:

\Program Files(x86)\MSBuild\Microsoft\Visual Studio\v11.0\Web\
\Program Files(x86)\MSBuild\Microsoft\Visual Studio\v11.0\WebApplications\

To the same location on your server.

Then make a simple batch file:

"C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" /v:diag YOUPROJECT.sln /p:Configuration=Debug /p:DeployOnBuild=true /p:PublishProfile=YOURPROFILE

This is working for us on multiple build servers.



来源:https://stackoverflow.com/questions/16176894/how-to-build-visual-studio-2012-publishing-profiles-on-a-build-server-with-msbui

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