我试图从.NET Core启动设置中删除IIS Express配置文件,但是每次我提出该解决方案时,Visual Studio都将其重新添加回去。例如,在一个新项目中,我的启动设置如下:
I am trying to remove the IIS Express profile from my .NET Core launch settings but every time i repoen the solution, Visual Studio adds it back in again. For example, in a new project my launch settings looks like this
{ "iisSettings": { "windowsAuthentication": false, "anonymousAuthentication": true, "iisExpress": { "applicationUrl": "localhost:55735/", "sslPort": 0 } }, "profiles": { "IIS Express": { "commandName": "IISExpress", "launchBrowser": true, "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } }, "MyProject": { "commandName": "Project", "launchUrl": "localhost:5010", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } } } }我删除了IIS部分
{ "profiles": { "MyProject": { "commandName": "Project", "launchUrl": "localhost:5010", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } } } }该解决方案运行良好。但是,一旦我关闭并重新打开解决方案,IIS部分就会重新出现。
The solution runs fine. But as soon as I close and reopen the solution the IIS sections reappear.
有什么想法吗?
推荐答案更新:
该问题应通过Visual Studio 2017(版本)的最新版本(更新)解决。 15.3.0)。
The issue should be fixed with the latest release (update) of Visual Studio 2017 (version 15.3.0).
初始答案:
这不是解决方案,但这是一个丑陋的解决方法。我认为,如果我只是拒绝更改 launchsettings.json 文件的权限,这将防止Visual Studio每次覆盖它。由于此文件变化不大,因此对我来说还是一个令人满意的解决方案。
This is not a solution, but an ugly workaround. I figured that if I would just deny permissions to change the launchsettings.json file this will prevent Visual Studio from overwriting it every time. Since this file doesn't change much, it is more or less a satisfying solution for me.
所以:
希望它会有所帮助。
更多推荐
Visual Studio不断将IIS Express重新添加到我的launchsettings.json中
发布评论