Last post Jan 28, 2020 02:50 AM by Sherry Chen
Jan 27, 2020 11:50 AM|CalebTaylor|LINK
I have all the latest ASP.NET CORE, Visual Studio 2019 installed just a few days ago...
When following the Tutorial: Create a web API with ASP.NET Core, https://docs.microsoft.com/en-us/aspnet/core/tutorials/first-web-api?view=aspnetcore-3.1&tabs=visual-studio
coming to step Scaffold a controller
I get the following error,
There was an error running the selected code generator:
'Could not get the reflection type for DbContext :
and cannot continue...
Screenshot of error: https://drive.google.com/file/d/1fhHTtrAFYbNDGl_5I1-ILKiwAlndlL0A/view?usp=sharing
Jan 28, 2020 02:50 AM|Sherry Chen|LINK
Hi CalebTaylor ,
Follow the official tutorial you provided , I create a ASP.NET Core 3.0 Web API project on Visual Studio 2019 v16.4.3 and scaffold the controller successfully.
It's not easy to reproduce your isse . What's your test environment?
Do you try to Clean Solution , Rebuild Solution and check if there are errors before scaffolding the controller? Is there the same error in a new project ?
Best Regards ,