Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Scaffolding failed. Could not load information for project..." in .NET 6 Web API

I got this message when trying to create an API Controller. I did seperate API project referrence to DBContext and entities in another class library.

Error Message

I have tried the same project with .NET 5, it's working well but not .NET 6. Please help me!

like image 929
Phú Huy Phạm Avatar asked Sep 11 '25 14:09

Phú Huy Phạm


2 Answers

Trevoir Williams from Udemy said: Versions 6.0.8 and 6.0.9 you can reduce the version of the EntityFrameworkCore* libraries to 6.0.7 in project file Project File

Or change EntityFrameworkCore* version in NuGet package manager Nuget package manager

Again, all this information and images I get from Trevoir Williams. I think this issue will be solved quickly. In this time, this is the fast way for everyone love .NET 6.

like image 93
Phú Huy Phạm Avatar answered Sep 14 '25 06:09

Phú Huy Phạm


I had the same issue and solved updating:

Microsoft.EntityFrameworkCore to 6.0.9

Microsoft.EntityFrameworkCore.Tools to 6.0.9

Microsoft.VisualStudio.Web.CodeGeneration.Design to 6.0.10
like image 20
Alejandro Avatar answered Sep 14 '25 06:09

Alejandro