Publishing vs2012 solution from TeamCity

前端 未结 1 777
一整个雨季
一整个雨季 2020-12-24 09:08

I\'m using Visual Studio 2012 and the publishing feature. I have created a publishing profile that deploys my application to a development server, and it works great when ex

相关标签:
1条回答
  • 2020-12-24 09:34

    I have just blogged about this at http://sedodream.com/2013/01/06/CommandLineWebProjectPublishing.aspx.

    You are pretty close, hopefully I can close the gap.

    You are correct that username and password are specified in the VS publish dialog, but we do not save the password in the .pubxml file. It is currently being saved in the .pubxml.user file, and that file is not used at all for command line scenarios. Because of that you will need to pass in the property. So in your case it should be

    msbuild .\src\solution.sln /p:DeployOnBuild=true /p:PublishProfile=ci /p:Password=<insert-password>
    

    If your web server does not have trusted certs you may need to also pass in /p:AllowUntrustedCertificate=true.

    One little addition which may not be directly related to your issue, but may be helpful for others which may see this later. If you are building the .csproj/.vbproj file (and potentially in some scenarios where the .sln file is used) you should pass in the property /p:VisualStudioVersion=11.0. More info on this available at my blog http://sedodream.com/2012/08/19/VisualStudioProjectCompatabilityAndVisualStudioVersion.aspx

    0 讨论(0)
提交回复
热议问题