源代码管理中的.vs \ config \ applicationhost.config [英] .vs\config\applicationhost.config in source control

查看:179
本文介绍了源代码管理中的.vs \ config \ applicationhost.config的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Visual Studio 2015添加名为.vs\config\applicationhost.config的文件 创建ASP.NET Web应用程序项目时,将其放置到解决方案的根目录.

Visual Studio 2015 adds a file named .vs\config\applicationhost.config to the root of a solution when an ASP.NET Web application project is created.

应将此文件签入源代码管理还是应将其忽略(以便每个用户都有自己的本地副本)?

Should this file be checked in to source control or should it be ignored (so that each user will have their own local copy)?

推荐答案

但是,在某些情况下,您想要在applicationhost.config文件上保留一些配置,例如按照

However, there are cases where you want to persist some config on your applicationhost.config file such as registering FQDN as explained here.

对于这种类型的配置,您想使用全局应用程序主机文件,在其中可以持久保存更改.

For this type of config, you want to use the global application host file where you can persist your changes.

在经典的Web应用程序项目(具有.csproj文件的地方)中,需要在.csproj文件中将UseGlobalApplicationHostFile属性设置为true:

In a classic Web Application project (where you have .csproj file), you need to set the UseGlobalApplicationHostFile property to true inside the .csproj file:

<UseGlobalApplicationHostFile>True</UseGlobalApplicationHostFile>

VS 2015对此表示赞赏,并使用全局应用程序宿主文件.但是,据我所知,目前还没有办法告诉ASP.NET 5项目寻找它.

VS 2015 honors this and uses the global application host file. However, there is no way to tell ASP.NET 5 projects to look for this today as far as I know.

这篇关于源代码管理中的.vs \ config \ applicationhost.config的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆