rubens.lopes
rubens.lopes

Reputation: 2535

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.

Upvotes: 5

Views: 7798

Answers (3)

Willie_T_Lee
Willie_T_Lee

Reputation: 11

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.

Upvotes: 1

Yusubov
Yusubov

Reputation: 5843

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.

Upvotes: 6

Preet Sangha
Preet Sangha

Reputation: 65506

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

Upvotes: 1

Related Questions