When you are building entity classes with Scaffold-DbContext sometimes you might encounter the Build failed error.
We can avoid this error by making sure your project does not have compile time errors. That mean the project should build successfully.
Cheers
Samitha