gpt4 book ai didi

azure - 为 VS 2019 发布多个项目

转载 作者:行者123 更新时间:2023-12-04 16:27:54 25 4
gpt4 key购买 nike

在 Microsoft Azure 中发布 1 个项目非常棒,而且非常简单。但是,如何发布包含多个项目的解决方案(我有一个 C# ASP MVC web + 3 个类库 + 数据库)?我无法弄清楚这一点并猜测我真的很愚蠢或者只是错过了显而易见的事情。我可以免费试用 Azure - 这会影响我是否可以这样做吗?请提供 Visual Studio 2019 示例。我读了很多有关虚拟目录的内容,但我仍然不知道如何上传其他项目。尝试过Deploy multiple project solution to azure , https://learn.microsoft.com/en-us/azure/azure-resource-manager/vs-azure-tools-resource-groups-deployment-projects-create-deployhttps://social.msdn.microsoft.com/Forums/en-US/fad89061-935d-49b5-9839-4e4f76ce44c5/publish-solution-with-multiple-projects?forum=winformssetup .

最佳答案

解决方案是使用虚拟目录。

请按照以下步骤操作:

<强>1。发布主项目。

enter image description here

enter image description here

部署主项目时,使用默认即可。不做任何修改,它将部署到 site\wwwroot。

<强>2。设置虚拟目录。

我们都知道默认情况下 Web 应用程序将部署到 site\wwwroot,因此让我们在此下创建一个子目录来部署新项目。

转到您网站的 Kudu。

enter image description here

进入kudu后,点击这里的cmd。

enter image description here

然后单击站点 wwwroot。在此目录下创建一个新文件夹。我创建的是“test111”

enter image description here

完成上述步骤后,转到您网站的配置。

enter image description here

转到路径映射标记以添加虚拟目录。这是我的设置:

enter image description here

<强>3。在同一网站下部署其他项目。

将上面添加的虚拟目录添加到以下选项:

enter image description here

保存并发布。

如果您想部署更多项目,只需重复步骤2和3即可。

关于azure - 为 VS 2019 发布多个项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59167029/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com