.vs\config\applicationhost.config in source control

前端 未结 2 1925
误落风尘
误落风尘 2020-12-12 17:34

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.

2条回答
  •  星月不相逢
    2020-12-12 18:20

    You should ignore .vs folder all together.

    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.

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

    True
    

    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.

提交回复
热议问题