为什么 ASP.NET 核心解决方案在迁移到 Visual Studio 2017 后下降?

Why ASP.NET Core solution is falling after migrating to Visual Studio 2017?

我正在尝试将现有的 Web API 解决方案迁移到 Visual Studio 2017。

它在 Visual Studio 2015 年完美运行。

我按照自动升级到 VS 2017,但在调试开始解决方案后它中断了,我得到这个错误:

code:-32000
message:No script for id: 35
'dotnet.exe' (CoreCLR: DefaultDomain): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App.0.4\System.Private.CoreLib.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The program '[6264] dotnet.exe' has exited with code -532462766 (0xe0434352).
The program '[14468] chrome.exe: WebKit' has exited with code -1 (0xffffffff).
The program '[5056] iisexpress.exe' has exited with code 0 (0x0).

启动解决方案后无需调试得到 this error in browser.

根本无法调试解决方案。坏了。

我可以提供更多信息,但现在不知道哪些是相关的。

编辑: 该解决方案由 3 个项目组成。每个项目的 project.json 和 .csproj 文件,以及 launchSettings.json 是 here。它们反映了我的依赖项合并后的状态。

另外,我可以分享整个解决方案,你可以尝试自己迁移。

原因是 VS 2017 版本 15.0 (26228.12) 中的错误。升级到版本 15.1 (26403.03),错误消失。

根据@DOMZE 结果

try running it without IIS (where you have the start debugging button, click the little arrow and choose the name of your project, it will start KESTREL instead of hosting it in IIS) It's probably crashing because of a missing dependency

其次让@Alexan link 尝试所有步骤 Migration from project.json to csproj。做同样的事情@Alexan 的意思是

try to clear the local nuget cache

在我尝试了这些之后,无法修复错误。我尝试按照 link 安装 core 2.0 sdk。并重启 visual studio 2017.

这里是Link.net core 2.0 sdk

请注意,如果 link 不见了,您可以找到 google 它来找到“.net core 2.0 sdk”。