'Scaffold-DbContext failed to build, how do i resolve this issue on Nuget console?
I have installed all required packages for this command, when i try to run this command on my console its failed to build. Kindly please assist to resolve this issue, thanks.
PM> Scaffold-DbContext "Server=Gcobanim-L\SQLEXPRESS;Database=eNtsaRegistration;Trusted_Connection=True" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models
Build started...
Build failed.
Solution 1:[1]
First rebuild the project and see any errors and were fixed.
Execute the command again and ran successfully without any issue.
Update-Database also build successfully.
Solution 2:[2]
For command line tool dotnet ef dbcontext scaffold
there is a flag --no-build
:
--no-build Don't build the project. Intended to be used when the build is up-to-date.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | mailer testmail |
Solution 2 | cikatomo |