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

前端 未结 13 2393
忘了有多久
忘了有多久 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:51

    All the answers above didn't work for me.

    However, this is the Error message i got -
    "detected package version outside of dependency constraint microsoft.aspnetcore.app 2.1.1 requires microsoft.netcore.razor.design...bla bla bla"

    How i overcame it was to install a lower version of razor via nuget package manager:

    Steps:

    on Visual Studio 2017 Click on Tools > Nuget Package Manager > Package Manager Console then run the command below.

    Install-Package Microsoft.VisualStudio.Web.CodeGeneration.Design -Version 2.1.1

提交回复
热议问题