I have been trying to add a scaffold item in ASP.NET Core, razor pages using Entity Frameword (CRUD). My current target framework is netcoreapp3.1.
I have the following package versions:
Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.9"Include="Microsoft.Microsoft.EntityFrameworkCore.Tools" Version="3.1.9"Include="Microsoft.Microsoft.VisualStudio.Web.CodeGeneration.Core" Version="3.1.4"
This is the instructions I am following: https://docs.microsoft.com/en-us/aspnet/core/data/ef-rp/intro?view=aspnetcore-5.0&tabs=visual-studio#scaffold-student-pages.
However, when I try adding a scaffold item, the following error occurs:
I've tried the following ways to solve the problem:
- Clearing nuget cache
- Reverting all package versions to 3.1.4
- Adding the nuget online reference (https://api.nuget.org/v3/index.json) in package sources.
- Re-installing Visual Studio
- Clearing
ComponentModelCache
Now I'm just wondering if the error is due to using 3.1 framework instead of the latest 5.0.
