如何更改Web安装项目的安装路径?
使用默认的 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论