Reputation: 1717
How can I run Scaffold-DbContext while ignoring build errors ?
I removed all the modules and need to create it again. When I run the Scaffold-DbContext command it gives a lot of builds errors:
Scaffold-DbContext "Server=CONNICTION_STRING" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models -f
I have tried the -no-build parameter but it's not working (https://github.com/dotnet/efcore/issues/9484)
Scaffold-DbContext : A parameter cannot be found that matches parameter name 'no-build'. At line:1 char:193 + ... ntityFrameworkCore.SqlServer -OutputDir Models -no-build -f + ~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [Scaffold-DbContext], ParameterBindingException + FullyQualifiedErrorId : NamedParameterNotFound,Scaffold-DbContext
Upvotes: 0
Views: 2510
Reputation: 30995
Microsoft.EntityFramework.Core.Design
in this project.Upvotes: 0
Reputation: 21343
How can I run Scaffold-DbContext while ignoring build errors ?
You cannot run the Scaffold-DbContext command when there is a project build error. This is by design. You can submit feedback about this feature on the EF Core forum.
And from the Scaffold-DbContext, we can see there doesn't have the -no-build
parameter.
Upvotes: 2