Visual Studio Web 安装项目 - 部署在 Web 根目录 (wwwroot) 之外

发布于 2024-08-02 13:03:57 字数 149 浏览 2 评论 0原文

我正在使用 Visual Studio 安装项目来安装 Web 应用程序。我正在寻找一种方法来更改默认的物理文件安装路径。我想要的最终结果是一个名为“MySite”的虚拟目录,它指向服务器上的本地路径,例如“C:\Apps\MySite”

是否有内置选项可以自定义它?

I am working with Visual Studio setup projects to install web application. I am looking for a way to change the default physical file installation path. The end result I would like is a Virtual Directory called "MySite" that points to a local path on the server like "C:\Apps\MySite"

Is there a built-in option to customize this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

两相知 2024-08-09 13:03:57

编辑项目文件。搜索关键字“virtual”并更改虚拟目录的值。

edit the project file. search for keyword 'virtual' and change the value for virtual directory.

心的憧憬 2024-08-09 13:03:57

不,它将安装在安装网站的物理文件安装路径加上虚拟目录的名称。

No, it will install at the physical file installation path of the Web Site where it is installed plus the name of the virtual directory.

花海 2024-08-09 13:03:57

您必须使用自定义操作来完成此操作,不幸的是,它不支持作为安装项目中的简单设置(正如其他人提到的那样)。

以下是使用自定义操作的示例实现:

允许用户在 Web 项目部署期间设置物理目录路径< /a>
(有点旧,但仍然有用)

You have to do it with a custom action, unfortunately it's not supported as a simple setting in the setup project (as others have mentioned).

Here is an example implementation using custom action:

Allow user to set physical directory path during Web Project deployment
(a bit old but can still be useful)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文