In Visual Studio 2019 I am trying to install some NuGet packages in order to fix the automatic scaffolding (creating controller with views in ASP.NET MVC 5).
If I try:
Install-Package Microsoft.VisualStudio.Web.CodeGenerators.Mvc -v 3.1.5
Then 2 'yellow' errors occur:
Install failed. Rolling back...
Package 'Microsoft.VisualStudio.Web.CodeGenerators.Mvc.3.1.5 : Microsoft.VisualStudio.Web.CodeGeneration [3.1.5, )' does not exist in project 'SampleProject'
Package 'Microsoft.VisualStudio.Web.CodeGenerators.Mvc.3.1.5 : Microsoft.VisualStudio.Web.CodeGeneration [3.1.5, )' does not exist in folder 'C:\Users\x\SampleProject\packages'
The supposedly missing package is already installed.
And 1 'red' error:
Install-Package : Could not find a part of the path 'C:\Users\x\SampleProject\packages\Microsoft.VisualStudio.Web.CodeGenerators.Mvc.3.1.5\Templates/Identity_Versioned/Bootstrap3/Pages/Account/
Manage/Account.Manage.TwoFactorAuthentication.cs.cshtml'.
At line:1 char:1
Is there a way to avoid the hard dependency on the 'TwoFactorAuthentication.cs.cshtml' presented in the 'red' error? The project doesn't use 2FA.