Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Downgrade MVC project from Framework 4.5 to 4.0

Is there a defined way of downgrading a solution to a lower version of the .net Framework.

like image 953
rubens.lopes Avatar asked Jun 13 '12 01:06

rubens.lopes


People also ask

How do I downgrade .NET Framework in Windows 10?

Select Programs, then select Programs and Features. Click on "Microsoft . NET Framework 4.7" Click Uninstall/Change at the top of this screen, and uninstall .


3 Answers

Try to target .NET Framework 4.0 in your solution first.

Right click on your project-> Properties->Application panel. You should see it there. After setting your target framework you have to compile and address all possible framework specific scenarios.

like image 160
Yusubov Avatar answered Sep 22 '22 14:09

Yusubov


In Visual studio you should set the target to be Framework 4.0 (msdn). And then fixup the errors for any code manually that relies on 4.5

like image 1
Preet Sangha Avatar answered Sep 22 '22 14:09

Preet Sangha


If you have downloaded any packages using Nuget while your project was a 4.5 project, you need to manually remove the packages and install the pages again after you have changed your project to 4

First Update the packages and this will change many of packages using the command PM> update-package

You can remove the packages using PM > uninstall-package packageName -force

Install the package back using PM>install-package packageName

You can check to make sure all your nuget packages are 4.0 by looking at the packages.config file in the root of each project.

like image 1
Willie_T_Lee Avatar answered Sep 20 '22 14:09

Willie_T_Lee