Kev*_*don 12 iis-express .net-core kestrel-http-server asp.net-core-webapi
我试图从我的.NET Core启动设置中删除IIS Express配置文件,但每次重新编写解决方案时,Visual Studio都会重新添加它.例如,在新项目中,我的启动设置如下所示
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:55735/",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"MyProject": {
"commandName": "Project",
"launchUrl": "http://localhost:5010",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
我删除了IIS部分
{
"profiles": {
"MyProject": {
"commandName": "Project",
"launchUrl": "http://localhost:5010",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
解决方案运行正常.但是一旦我关闭并重新打开解决方案,IIS部分就会重新出现.
有任何想法吗?
更新:
应使用Visual Studio 2017(版本15.3.0)的最新版本(更新)修复此问题.
初步答案:
这不是一个解决方案,而是一个丑陋的解决方法.我想如果我只是拒绝更改launchsettings.json文件的权限,这将阻止Visual Studio每次都覆盖它.由于这个文件没有太大变化,对我来说这或多或少是一个令人满意的解决方案.
所以:
launchsettings.json最后一次更新你的.希望能帮助到你.
| 归档时间: |
|
| 查看次数: |
1473 次 |
| 最近记录: |