Upgrading MVC from 4.0 to 5.2 - Failed to install package

I am trying to upgrade my project from MVC 4.0 to 5.2. But as soon as I do that, I get an error:

Install-Package : Could not install package 'Microsoft.AspNet.Razor 3.2.3'. You are trying to install this packag
e into a project that targets '.NETFramework,Version=v4.0', but the package does not contain any assembly referen
ces or content files that are compatible with that framework. For more information, contact the package author.
At line:1 char:1
+ Install-Package Microsoft.AspNet.Mvc -Version 5.2.3
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], InvalidOperationException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand


How can I solve this problem? And what does it mean?


source to share

All Articles