Publish Profile not deploying on TFS Build

筅森魡賤 提交于 2019-12-12 11:11:36

问题


I have a .net4 solution in VS2012 that has a website with its own publishprofile.

The profile successfully publishes via webdeploy when executed from within VS, but when using a TFS2012 build it seems to get ignored.

I pass these MSBuild arguments into the build:

/p:DeployOnBuild=true /p:AllowUntrustedCertificate=true /p:PublishProfile=CI /p:Configuration=CI /p:UserName=XXX /p:Password=XXXXXX

I thought DeployOnBuild=true would force MSBuild to execute the publish profiles of the same name within the solution.

Is this not the case?


回答1:


Just came across this question in my search. When you have created a publish profile (in your case, called "CI"), it is saved into an xml file in the properties section of the project, with the extension ".pubxml".

So as an answer to your question, you should replace the /p:PublishProfile=CI part with /p:PublishProfile=CI.pubxml.




回答2:


In my case I use this arguments for the msbuild.

/p:OutDir=$(build.stagingDirectory) /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true

In this case, it generates a Package folder with the project that it has the website.



来源:https://stackoverflow.com/questions/17423500/publish-profile-not-deploying-on-tfs-build

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