I have an MVC 5 project that I am working on with EF 6.x. I am using: Microsoft Visual Studio Enterprise 2017 Version 15.4.2 VisualStudio.15.Release/15.4.2+27004.2006 Microsoft .NET Framework Version 4.7.02556
I have a model that I created and did a migration to the database. However as I continued coding I realized that I needed a new column. I created it and then created a new migration and ran update-database. My new column is in the database so I went to my controller right clicked the controller action and then add view. I put the view name the template that I want to use and then select my model. When I click add I get the following error:
Microsoft Visual Studio Error
There was an error running the selected code generator:
'Error HRESULT E_FAIL has been returned from a call to a COM component.'
I can create the view without the template and model however it only seems to be the one model as I can pick others that are in the project and it will create the view on that.
Troubleshooting steps thus far:
- I have deleted the controller and recreated.
- Followed these
- Deleted Visual Studio cache
- Deleted the .suo file Deleted the
- .csproj.user file
Any thought to what to try next would be helpful thanks!