2

I've got wierd situation, When Im trying to update db Model by using

"dotnet ef dbcontext scaffold Microsoft.EntityFrameworkCore.SqlServer --force"

I'm gettin an error "Build failed. Use dotnet build to see the errors."

BUT when i rebuild solution

enter image description here

Rebuild succeeded.

Any idea what is happing? I hadn't problems with that before

MT0
  • 143,790
  • 11
  • 59
  • 117
  • Is the project you're running this on referencing the Microsoft.EntityFrameworkCore.Tools nuget package? – DCCoder May 15 '21 at 00:28
  • Yes, but what is weird. I'm using Rider, but when I switched to visual studio, and used pmConsole everything worked fine again, but via terminal not. – Rafał Wolschlaeger May 16 '21 at 12:13

1 Answers1

1

Make sure any assembly projects included in your main project build successfully.

Clean your project and make sure it is also built successfully. You might get the error Build started… Build failed. if one of the projects has a problem building successfully.

sholatunji
  • 11
  • 2
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Mar 17 '23 at 09:17