如何更改Web安装项目的安装路径?

发布于 2024-11-19 22:19:16 字数 348 浏览 5 评论 0原文

使用默认的 Web 安装项目,安装将位于 inetpub/wwwroot 中。 我尝试使用自定义操作,并在 onInstall 方法中执行此操作。

Context.Parameters["targetdir"] = @"C:\testing";
base.Install(stateSaver);

我已将 /targetdir="[TARGETDIR]\" 添加到用于安装和提交的自定义操作数据,但安装路径仍位于 wwwroot。

据我所知,您可以首先创建一个虚拟目录,然后使用相同的虚拟目录名称使用普通的 Web 项目进行部署。但我希望能够减少步骤。无论如何建议这样做?

Using the default web setup project, the installation will be in inetpub/wwwroot.
I have tried to use custom action, and inside onInstall method, i did this.

Context.Parameters["targetdir"] = @"C:\testing";
base.Install(stateSaver);

I have already added /targetdir="[TARGETDIR]\" to custom action data for install and commit, but the installation path stays at wwwroot.

I understand that you can create a virtual directory 1st, and deploy using a normal web project using the same virtual directory name. But I'm wishing that steps could be reduced. Anyway advised to this?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文