vs2019 While adding new view getting Erro 'The Templates\PackageVersions5.2.6.xml file is missing from the installed template folder.'

-1

VS2019 'The Templates\PackageVersions5.2.6.xml file is missing from the installed template folder.' MVC, C# ? Create Action Method - Controller Right Click - Add View - Throws Error

Digant Dudharejia

Posted 2019-04-04T19:59:34.590

Reputation: 21

Can't understand why it is downvoted ? – Digant Dudharejia – 2019-04-29T17:24:04.780

Answers

2

Look in your packages.config file. You should find "Microsoft.AspNet.Mvc" version="5.2.6". Change the 5.26 to 5.2.7 and you should be good to go.

John Carroll

Posted 2019-04-04T19:59:34.590

Reputation: 21

2

I'm not sure why the original post is being downvoted. I had this exact issue and came looking for a solution.

I found that upgrading the "Microsoft.AspNet.Mvc" package via NuGet to 5.2.7 was not sufficient to fix the problem. I also had to upgrade "Microsoft.AspNet.WebApi" and its related packages to 5.2.7. The Add View option started working again afterward.

Chanticrow

Posted 2019-04-04T19:59:34.590

Reputation: 21