停止Visual Studio 2013修改IISExpress applicationHost.config [英] Stop Visual Studio 2013 modifying the IISExpress applicationHost.config
问题描述
我有一个使用Visual Studio 2013的网站项目,每次打开它时,它都会在applicationHost.config中为网站项目添加一个新条目.我使用IISExpress进行开发,但是我总是创建一个自定义条目来提供一些细节,并且将其配置为使用端口80,因此我不希望Visual Studio对该文件进行任何修改.
I have a website project using Visual Studio 2013, and each time I open it, it keeps adding a new entry for the website project in applicationHost.config. I use IISExpress for my development, however I always create a custom entry to provide some specifics and I have it configured to use port 80, so I would like to not have Visual Studio make any modifications to this file.
我已进入工具">选项">"Web项目",并且未选中对网站和项目使用IIS Express的64位版本",关闭了解决方案,从applicationHost.config中删除了该条目,然后在Visual中重新打开了该项目Studio,但是它仍然继续在applicationHost.config中添加一个条目,并以该条目的名称命名我的网站项目.
I have gone into Tools > Options > Web Projects and unchecked "Use the 64 bit version of IIS Express for web sites and projects", closed the solution, removed the entry from applicationHost.config and re-opened the project in Visual Studio, however it still continues to add an entry to applicationHost.config and name my website project whatever that entry is named.
是否有一种方法可以将Visual Studio与IISExpress完全断开?我喜欢使用它,但我想自己控制该服务和配置.
Is there a way to disconnect Visual Studio entirely from IISExpress? I like using it, but I want to control that service and configuration myself.
推荐答案
在site部分的bindings部分中,除了本地版本外,还创建一个新的绑定,如下所示:
Inside the bindings section of the site section, create a new binding in addition to the localhost version like so:
<bindings>
<binding protocol="http" bindingInformation="*:21232:localhost" />
<binding protocol="http" bindingInformation="*:21232:*" />
</bindings>
在两行内容之后,VS停止制作新的网站部分.
After having both lines, VS stopped making new site sections.
这篇关于停止Visual Studio 2013修改IISExpress applicationHost.config的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!