How do I change the .NET Framework from version 3.5 to version 4.0

.net, c#, visual-studio

Solution

In Visual Studio:

- Right-click on your project

- Select Properties

- Select the Application tab

- Change the Target Framework to the desired framework

If you are not seeing .NET Framework 4 as an option there, ensure you have it installed.

For completeness, one can also point an existing DLL to a later version of the .NET Framework without recompiling using Binding Redirects.

Problem

I have created a class library in .NET Framework 3.5. Now I want to change the .NET Framework Version to 4.0. How can I do this?

Original source