本文介绍了解决方案具有多个Web应用程序时,使用TFS 2010 + MSDeploy的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两种解决方法

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

      我也有两个TFS 2010构建配置

      I also have two TFS 2010 build configurations

      • BuildConfigA
        • 应构建SolutionA并部署WebApplication1
        • BuildConfigA
          • should build SolutionA and deploy WebApplication1
          • 应构建SolutionB并部署WebApplication2(但不能WebApplication1)
          • should build SolutionB and deploy WebApplication2 (but notWebApplication1)

          为防止BuildConfigB尝试部署WebApplication1,我在WebApplication1.csproj中放入了<DeployOnBuild>false</DeployOnBuild>.但这也阻止了BuildConfigA的部署.我如何适应这种情况?

          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?

          推荐答案

          我最终决定这样做.我现在有三种解决方案

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

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

              我在SolutionB中完成了大部分开发工作,因为我喜欢能够轻松引用和针对这两个项目进行编译.除了作为以下两个构建配置的一部分之外,我什么都没有使用过SoluctionC

              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
                • 应构建SolutionA并部署WebApplication1
                • BuildConfigA
                  • should build SolutionA and deploy WebApplication1
                  • 应构建SolutionC并部署WebApplication2(而不是WebApplication1当然)
                  • should build SolutionC and deploy WebApplication2 (and notWebApplication1 of course)

                  这篇关于解决方案具有多个Web应用程序时,使用TFS 2010 + MSDeploy的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-18 20:49