We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remember:
I can reproduce the issue every time. Just clone my code: https://github.com/doggy8088/VS2022ScaffoldingBug
Here are the steps to reproduce the issue:
Open Solution Explorer, Right-click on the Controllers folder, then Add > Controller.
Add > Controller
Choose the item template: MVC Controller with views, using Entity Framework
MVC Controller with views, using Entity Framework
Model class: Course
Course
DbContext class: ContosoUniversityContext
ContosoUniversityContext
Hit Add button.
Add
Then you will see the following error:
There was an error running the selected code generator: 'Exception of type 'System.InvalidOperationException' was thrown.'
The error message is really too vague. I took 2 hours to figure it out the root cause. I think the error message can be improved.
I also reported this issue there for VS2022: https://developercommunity.visualstudio.com/t/I-wish-there-is-a-feature-that-can-save/10691680?port=1025&fsid=ce2921a1-dd02-402d-8377-b214f05199a5
N/A
Microsoft.VisualStudio.Web.CodeGeneration.Design version: 8.0.2 Target framework: .NET 8.0 Operating system: Microsoft Windows [Version 10.0.19045.4412] IDE: Visual Studio 2022 17.10.3
8.0.2
.NET 8.0
Microsoft Windows [Version 10.0.19045.4412]
Visual Studio 2022 17.10.3
The text was updated successfully, but these errors were encountered:
No branches or pull requests
File a bug
Remember:
Include your code
I can reproduce the issue every time. Just clone my code: https://github.com/doggy8088/VS2022ScaffoldingBug
Here are the steps to reproduce the issue:
Open Solution Explorer, Right-click on the Controllers folder, then
Add > Controller
.Choose the item template:
MVC Controller with views, using Entity Framework
Model class:
Course
DbContext class:
ContosoUniversityContext
Hit
Add
button.Then you will see the following error:
The error message is really too vague. I took 2 hours to figure it out the root cause. I think the error message can be improved.
I also reported this issue there for VS2022: https://developercommunity.visualstudio.com/t/I-wish-there-is-a-feature-that-can-save/10691680?port=1025&fsid=ce2921a1-dd02-402d-8377-b214f05199a5
Include stack traces
N/A
Include provider and version information
Microsoft.VisualStudio.Web.CodeGeneration.Design version:
8.0.2
Target framework:
.NET 8.0
Operating system:
Microsoft Windows [Version 10.0.19045.4412]
IDE:
Visual Studio 2022 17.10.3
The text was updated successfully, but these errors were encountered: