Reputation: 12253
I have a solution which contains 18 projects and targets framework 3.5. It also includes web installer project. When i am trying to upgrade the solution to framework 4.0, it gives me lots of errors and doesnt convert web projects and web installer projects.
Is there a way to convert projects manually rather than relying on visual studio wizard?
.wdproj files are not getting converted.
Error Log:
Project file opened successfully
No Conversion Required
Get root element Project successfully
No Conversion Required
ToolsVersion in String:
3.5
ToolsVersion in DWORD:
3.5
Require Upgrade
Ready to exit
Require Upgrade
Upvotes: 1
Views: 1281
Reputation: 520
I always have kind of a hard time finding the setting in visual studio for changing the version of .NET. And even then sometimes it has been greyed out (unchangable) through VS GUI. The way I typically change .NET is by opening your .sln file in notepad. In a Visual Studio 2010 .sln file there should be a line in there something like:
TargetFrameworkMoniker = ".NETFramework,Version%3Dv3.5"
Just change it to:
TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.0"
Save, and you should be good to go.
If you really want to change your framework through the GUI in Visual Studio 2010 for an asp.net project you can right click on your website (one tier under "Solution" in "Solution Explorer"). Select "Property Pages", then in the new window "Build" which has a field called "Target Framework" where you can change your .NET Framework.
Upvotes: 1
Reputation: 73
I understand that you want to change your framework for all the solutions from 3.5 t0 4.0
I think you can set that in visual studio 2010.
Open your entire solution in VS2010. right click on the project (do this for all the projects you have) then select properties. Click on compile tab on the left side . click on advanced compile options change the target framework to 4.0
I'm not sure but I thought of sharing this idea.
Let me know if this works.
Upvotes: 2