Build and Deploy a Web Application with TFS 2017 using Web Deploy Package

不羁岁月 提交于 2019-11-29 12:39:10

Nothing was working until I was looking into the TFS options for Build Definitions and when you have to select a template for the definition, you can see two options Build and Deployment, I was selecting Build's template but I tried with a Deployment option :

and by default in the MSBuild Arguments the parameter is :/p:OutDir="$(build.binariesdirectory)\\"

In that folder we have everything we need for the deployment.

PatrickLu-MSFT

To pass parameters into MSBuild you need a .pubxml file (called the publishing profile) within the PublishProfiles folder under your project properties folder. This is why using /p:DeployOnBuild=true;PublishProfile=MyProfile as the msbuild arguments. More details please refer Sayed Ibrahim Hashimi in this question: How do I configure MSBuild to use a saved publishProfile for WebDeploy?

If you want to generate Artifacts please make sure you also use the Publish Build Artifacts build step. Copy the Artifacts of the Build and Publish the Artifacts to Drop Location on the Server. This will be the location to later on pick the build artifacts for the Release. The files will locate at the staging folder-- Build.StagingDirectory something like agent/_work/2/a

For more details take a look at this topic Visual Studio Team Services Release Management IIS Web Deployment vnext

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