Error Scaffolding Controllers: There was an error running the selected code generator: Could not load file or assembly Microsoft.EntityFrameworkCore, version = 2.2


Error Scaffolding Controllers: There was an error running the selected code generator: Could not load file or assembly Microsoft.EntityFrameworkCore, version = 2.2

 

Solution:

1. Navigate to Nuget Library page in Visual Studio 2017 and Uninstall Microsoft.visualStudio.Web.CodeGeneration.Design

2. Build your Solution

3. Clean your Solution

4. Try to Scaffold your Controller again, Visual Studio will automatically install all the dependecies that allow Scaffolding to work in this case a library called Microsoft.visualStudio.Web.CodeGeneration.Design.


If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.

pankaj said:

Thank u it works

Posted On: December 17, 2021 7:26:15 AM

© 2023 - ErnesTech LLC- Privacy