将多个项目发布到 Azure 网站上的不同位置 [英] Publish Multiple Projects to Different Locations on Azure Website

查看:30
本文介绍了将多个项目发布到 Azure 网站上的不同位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请随意推荐更好的标题或对我下面的解释进行更改!

我正在使用 Windows Azure 网站(第一次)并将其连接到 Visual Studio Online 中的解决方案(也是我的第一次).我还能够连接到 Visual Studio Online,创建一个项目,抛出一个母版页和连接到母版页的 Web 表单,并且我的 Azure 网站进行了自我更新.太棒了!

I am using Windows Azure Websites (for the first time) and have connected it to a solution in Visual Studio Online (also my first time). I was also able to connect to Visual Studio Online, create a project, throw up a master page and web form connected to a master page and my Azure website updated itself. Great!

我的问题

如果我在解决方案中添加另一个项目,这个新项目似乎会覆盖第一个项目中的文件.我不知道如何设置:

If I add another project to the solution it seems that this new project overwrites the files in the first one. I can't figure out how to set this up so:

项目 1 -> 部署到 wwwroot(默认情况下发生很棒!)

Project 1 -> deploy to wwwroot (happens by default great!)

项目 2 -> 部署到 wwwroot/sub/directory/(似乎不起作用)

Project 2 -> deploy to wwwroot/sub/directory/ (doesn't seem to work)

有人能解释一下如何配置项目 2,以便当解决方案自动部署到 Azure 网站时,它会转到特定位置吗?

Could somebody explain how to configure project 2 so that when the solution auto deploys to an Azure Website that it goes to a specific location?

推荐答案

  1. 转到 Azure 门户中站点的配置"选项卡.
  2. 一直滚动到底部,然后在您想要的任何位置添加一个新应用程序,例如下面的 Project2.

  1. Go to the Configure tab for the site in Azure portal.
  2. Scroll all the way to the bottom then add a new application where ever you want like Project2 below.

基本上,Project2"部分是根/"之后的 URL,sitewwwrootProject2"是实际文件夹应该位于站点根目录下的位置

Basically the 'Project2' part is the URL after the root '/' and the 'sitewwwrootProject2' is where the actual folder should live under the site root

下载发布配置文件并将其导入 Visual Studio,然后在您的站点名称后添加应用程序名称,如下所示.还要记得更新目标 URL

Download the publishing profile and import it in Visual Studio, then add the application name after your site name like below. Also remember to update the destination URL as well

希望有帮助

这篇关于将多个项目发布到 Azure 网站上的不同位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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