从 Visual Studio Team Services 使用多个项目进行 Azure 持续部署 [英] Azure Continuous Deployment from Visual Studio Team Services with multiple projects

查看:21
本文介绍了从 Visual Studio Team Services 使用多个项目进行 Azure 持续部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用 Github(或 Visual Studio Team Services 以外的任何东西)时,我可以使用以下页面来自定义部署:https://github.com/projectkudu/kudu/wiki/Customizing-deployments

While using Github (or anything other than Visual Studio Team Services) I can use the following page to customize deployment: https://github.com/projectkudu/kudu/wiki/Customizing-deployments

我想自定义我的部署,因为我目前有一个 Web 应用程序和一个 Web api 项目.我希望部署 web 应用程序,默认情况下它部署 web api 项目.使用 Kudu 项目,设置(.deployment 文件,甚至更好,Azure 本身上的应用程序设置)效果很好,但当您从 Visual Studio Team Services 部署时就不行了.

I'd like to customize my deployment as I currently have both a web app and a web api project. I want the web app to be deployed, as default it deploys the web api project. Using project Kudu the settings (.deployment file or even better, the app settings on Azure itself) works great, but not when you deploy from Visual Studio Team Services.

我与来自 Project Kudu 的 David Ebbo 进行了交谈,他解释说 VS Team Services 根本不使用 Kudu,但可能使用 MS Build.所以我的问题是,如何具体部署 Web 应用程序.

I've spoken with David Ebbo from Project Kudu, and he explained that VS Team Services doesn't use Kudu at all, but probably MS Build. So my question is, how to specifically deploy the web app.

我设法更改了构建定义并将 Web 应用程序 .csproj 指定为要构建的项目.这有效.但是,我也想部署我的 web api.

I managed to change the Build Definition and specify the web app .csproj as the Projects To Build. This works. However, I also want to deploy my web api.

使用 Kudu 部署 web api 项目很容易,因为我可以创建一个单独的网站,连接到某个存储库(和解决方案)并指定项目应用程序设置,以便它部署正确的 .csproj.我们应该如何为 MS Build 做到这一点?当我更改构建定义时,它将始终部署其中指定的项目.

Deploying the web api project with Kudu is easy as I can create a separate website, connect to the some repository (and solution) and specify the Project App setting so that it deploys the correct .csproj. How should we do this for MS Build? When I change the Build Definition, it will always deploy the project specified in there.

推荐答案

刚刚在 Stackoverflow 上看到另一个解决这个问题的答案:将多个项目发布到 Azure 网站上的不同位置

Just saw another answer on Stackoverflow that looks to solve this problem: Publish Multiple Projects to Different Locations on Azure Website

这篇关于从 Visual Studio Team Services 使用多个项目进行 Azure 持续部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆