ASP.NET Core 5.0.9 with EntityFrameworkCore 5.0.9 strange behavior on scaffolding new Razor page

Matej Kr 1 Reputation point
2021-08-30T08:55:57.377+00:00

I have updated EntityFrameworkCore and its dependencies to version 5.0.9 (.Design, .Tools. SqlServer), as well as installed all .Net 5.0.9 packages.
On Scaffolding new Razor Page, dependency EntityFrameworkCore.SqlServer and EntityFrameworkCore.Tools get downgraded to version 5.0.8.
Regarding the downgrade, I always get the error "Could not load file or assembly 'Microsoft.EntityFrameworkCore.SqlServer, Version=5.0.9.0".

Running the application and navigating to the page using data from Sql always returns error EntityFrameworkCore.dll -> object reference not set to an instance of an object

Any advice?
Regards!

Developer technologies | .NET | Entity Framework Core
Developer technologies | ASP.NET | ASP.NET Core
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.