TFS 2010 + MSDeploy when solution has multiple web applications

戏子无情 提交于 2019-12-03 20:54:21

问题


I have two solutions

  • SolutionA.sln
    • WebApplication1.csproj
  • SolutionB.sln
    • WebApplication1.csproj
    • WebApplication2.csproj

I also have two TFS 2010 build configurations

  • BuildConfigA
    • should build SolutionA and deploy WebApplication1
  • BuildConfigB
    • should build SolutionB and deploy WebApplication2 (but not WebApplication1)

To prevent BuildConfigB from trying to deploy WebApplication1, I put a <DeployOnBuild>false</DeployOnBuild> in WebApplication1.csproj. But that also prevents BuildConfigA from deploying it. How could I accomodate this scenario?


回答1:


This is what I ended up deciding to do. I now have three solutions

  • SolutionA.sln
    • WebApplication1.csproj
  • SolutionB.sln
    • WebApplication1.csproj
    • WebApplication2.csproj
  • SolutionC.sln
    • WebApplication2.csproj

I do most of my development in SolutionB because I like being able to easily reference and compile against both projects. I don't use SoluctionC at all other than as part of the following two build configurations

  • BuildConfigA
    • should build SolutionA and deploy WebApplication1
  • BuildConfigB
    • should build SolutionC and deploy WebApplication2 (and not WebApplication1 of course)



回答2:


Hmm I'm pretty sure a build configuration can also build+deploy single projects, not necessarily solutions. So you could also drop sln A and sln C, and point your builds directly to the csproj files.

Ohad



来源:https://stackoverflow.com/questions/6217283/tfs-2010-msdeploy-when-solution-has-multiple-web-applications

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