# HTTP Error 500.31 - Failed to load ASP.NET Core runtime (To be moved to the blog site).

Source: https://help.codestencil.com/troubleshooting/http-error-500-31-failed-to-load-asp-net-core-runtime-to-be-moved-to-the-blog-site

The article serves as a comprehensive guide, walking you through the necessary steps to resolve the aforementioned error that arises when attempting to start your server.

![](https://cdn.eniston.com/bases/5691f589-9697-4a3a-b3a1-f6588fa2e596/attachments/annotation-2023-06-29-152555_1688054456.png "ASP.NET Core IIS Hosting")

1. Open the CodeStencil application.
2.  Load the project: Ensure that you load the correct project experiencing this error. The project loaded in your CodeStencil application should resemble the image below:
3. ![](https://cdn.eniston.com/bases/5691f589-9697-4a3a-b3a1-f6588fa2e596/attachments/2024-02-22-13-37-14_1708605545.png)Ensure that both the **Code Tree** and **Schema Dictionary** are loaded, located within the blue lines representing their respective contents.
4. When you toggle, a slider will appear in the top right corner of the image, marked by a red circle with the title **Expanders**. The expanders should resemble the image below:  
    ![](https://cdn.eniston.com/bases/5691f589-9697-4a3a-b3a1-f6588fa2e596/attachments/2024-02-22-13-40-02_1708605653.png)
5. From the image above, locate the expander named `<strong>DOTNET_FRAMEWORK</strong>`. This expander has an assigned version. Double-click the `<strong>DOTNET_FRAMEWORK</strong>` field to modify the version, ensuring it aligns with the **.NET** version on your machine. You can verify the **.NET** version in Visual Studio by double-clicking on the project name. If everything is done correctly, you should see something similar to the image below:  
    ![](https://cdn.eniston.com/bases/5691f589-9697-4a3a-b3a1-f6588fa2e596/attachments/annotation-2023-06-26-224607_1687816091.png)
6. From the expander image above, check for a field called `<strong>DOTNET_VERSION</strong>`. You can modify the version by double-clicking on the field. Also, ensure that you have the same **Entity Framework** version installed in your Visual Studio. You can accomplish this by navigating to your NuGet Package and searching for **Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore**. Your search result should resemble the image below:  
    ![](https://cdn.eniston.com/bases/5691f589-9697-4a3a-b3a1-f6588fa2e596/attachments/annotation-2023-06-26-225515_1687816609.png)
7. Once the above steps have been completed correctly, you can regenerate the stencil and get your server running. Cheers!🥳
