How to automate Web Deploy of a specific Publish Profile with an MSBuild script?

前端 未结 2 1794
失恋的感觉
失恋的感觉 2021-02-14 10:31

I have a Visual Studio 2012 solution, which contains three web projects. Each of them has a web deploy publish profile, which creates a package in a specific directory. The solu

相关标签:
2条回答
  • 2021-02-14 11:02

    Are all three published profiles named the same way? If so, could you just add

    /p:PublishProfile=MyProfile to the msbuild command?

    See this link for more info

    0 讨论(0)
  • 2021-02-14 11:07

    I think you can try the following:

    msbuild.exe MyProject.csproj /p:DeployOnBuild=true;PublishProfile=MyProfile
    

    as pointed by Steve, this post by Sayed Ibrahim Hashimi seems to address your requirement publish from an msbuild in detail.

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