问题
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