(VS2017) There was an error running the selected code generator: 'Sequence contains no elements'

前端 未结 13 2377
忘了有多久
忘了有多久 2021-01-04 11:34

I\'m running through one of Microsoft\'s tutorials on MVC development and I\'m getting errors when trying to create various elements; Views, Controllers, etc.

The e

13条回答
  •  感情败类
    2021-01-04 11:53

    Try clearing the ComponentModelCache, the cache will rebuild next time VS is launched.

    1. Close Visual Studio Delete everything in this folder
    2. C:\Users\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache
    3. Restart Visual Studio 14.0 is for visual studio 2015. This will work for other versions also.

    Credit to https://stackoverflow.com/a/35815094/5209435

    Edit

    Are your providerNames in the connectionString section of your web.config file the same?

    You may also want to try the suggested solutions from here or here.

提交回复
热议问题