[英]ASP.NET Core 2.0 Web App keeps starting IISExpress instead of Kestrel even though IISExpress settings are removed
Every time I keep starting my ASP.NET Core Web App, it keeps starting IISExpress. 每次我继续启动ASP.NET Core Web App时,它都会一直启动IISExpress。 I click DEBUG (or F5) and i noticed the little IISExpress systray icon show.
我单击DEBUG(或F5),然后注意到显示了IISExpress小系统托盘图标。 I then manually exit it.
然后,我手动退出它。 Also, None of the debug (start/stop/pause) buttons are displayed .. so it's like it's not start-debugging .. but start-running.
另外,没有显示任何调试(开始/停止/暂停)按钮..所以这就像不是开始调试..而是开始运行。
target framework: .NETCore 2.1 目标框架:.NETCore 2.1
Here's my files:- 这是我的文件:
launchSettings.json
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"profiles": {
"Kestrel - Accounts.Api": {
"commandName": "Project",
"launchBrowser": false,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:5000"
},
"Docker": {
"commandName": "Docker",
"launchBrowser": true,
"launchUrl": "{Scheme}://localhost:{ServicePort}"
}
}
}
and here's the project in the solution: 这是解决方案中的项目:
Another interesting thing to note, if I try and hit the localhost website (the port is some random port, not 5000
) the site never comes up eventually starts up ... and this is a simple basic site. 还要注意的另一件有趣的事情是,如果我尝试访问localhost网站(端口是一些随机端口,而不是
5000
),则该站点永远不会启动,最终会启动...这是一个简单的基本站点。
Can anyone suggest where I should look/fix, please? 有人可以建议我应该在哪里查看/修复吗?
I can run the website 100% fine if i use the CLI. 如果使用CLI,我可以100%罚款地运行网站。 Eg:
例如:
.csproj
) .csproj
的文件夹中) dotnet build
dotnet publish -c DEBUG -o /app
dotenet c:\\app\\Accounts.Api.dll
.. and it runs fine with normal stuff outputed to the console... ..并且可以正常运行,并向控制台输出正常内容...
OK - weird. 好-很奇怪 So I ended up doing the following:
所以我最终做了以下事情:
and now it works! 现在就可以了!
go figure :/ 去搞清楚 :/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.