Reputation: 2720
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?
Upvotes: 28
Views: 98355
Reputation: 880
Right-click on Project > Properties > Select Advanced tab > Change the Target Framework to the desired framework
Upvotes: 0
Reputation: 48558
Unfortunately this cannot be done once a .dll has been created. For this you need to have source of your class library.
Select Properties from Right clicking on the project in the solution explorer.
In Application Tab change Target Framework to Desired one.
Upvotes: 0
Reputation: 150108
In Visual Studio:
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.
Upvotes: 45
Reputation: 251
In Visual Studio 2010:
Upvotes: 1
Reputation: 1987
FYI - there's a "Target Framework Migrator" extension tool for Visual Studio (2013, 2015) that will do all projects in your solution in one go.
I'm working on a solution at the moment with a 100+ projects in it and it's not practicable to do each project one at a time IMO.
Upvotes: 0
Reputation: 106796
Right click on the project in the solution explorer and select Properties.
Make sure that the Application tab is selected.
In the Target framework dropdown select the desired framework, e.g. .NET Framework 4.
Upvotes: 3