.NET Core5 MVC/WebAPI - HTTP Error 500.30 - ASP.NET Core app failed to start_解决方案

程序中不报错,VisualStudio正常运行,但就是​​500​

日志

每次打开时都会在​​事件查看器​​中发现两条新异常日志

第一个:​Application '/LM/W3SVC/2/ROOT' with physical root ​​项目路径​​failed to load coreclr. Exception message: CLR worker thread exited prematurely​

第二个:​Application '/LM/W3SVC/2/ROOT' with physical root ​​项目路径​​has exited from Program.Main with exit code = '0'. Please check the stderr logs for more information.​

解决方案

查看最近新建的​​类/文件​​,看看它们的引用中有没有出现一行只有一个​​;​​符号的

.NET Core5 MVC/WebAPI - HTTP Error 500.30 - ASP.NET Core app failed to start_解决方案_02

我在把它去掉之后就可以正常访问了...这个就很迷- -