Hi leo del ciello ,
That issue is actually quite common and usually not related to your setup.
There’s a known EF Core 8 issue that can cause scaffolding to fail with a NullReferenceException when the database contains certain table names, for example, a table called Properties. The process starts normally but crashes during model generation.
#My recommendations:
- Scaffold only specific tables first Try generating models for just a few tables instead of the entire database to confirm the issue. Scaffold-DbContext "YourConnectionString" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models -Tables Product, Address, Customer
- Use the .NET CLI The command-line tool sometimes works better than the Package Manager Console: dotnet ef dbcontext scaffold "YourConnectionString" Microsoft.EntityFrameworkCore.SqlServer -o Models
- Try EF Core Power Tools This Visual Studio extension can scaffold your database in a different way and may avoid the same bug.
Hope this helps!