In this article I will provide solution to the error in Visual Studio: HTTP Error 500.31 - Failed to load ASP.NET Core runtime.
Error
HTTP Error 500.31 - Failed to load ASP.NET Core runtime
Common solutions to this issue:
The specified version of Microsoft.NetCore.App or Microsoft.AspNetCore.App was not found.
Troubleshooting steps:
Check the system event log for error messages
Enable logging the application process' stdout messages
Attach a debugger to the application process and inspect
Cause
The cause of this error is missing .Net 3.0 runtime.
Solution
You will need to download and install the missing .Net 3.0 runtime from the following link.
Steps
2. Click on the Hosting Bundle link shown below.
3. Once downloaded, close all Visual Studio and install the setup file.
4. Once installed, open Visual Studio and run the project.