Windows Form application for converting to .NET Framework 4.0 to 2.0

When creating a Windows Form application, I chose a target for the .NET Framework 4.0. Now I would like to create it .Net Framework 2.0. How to do this with Visual Studio 2010?

This is a VB.Net project. I have not seen the "Target Framework" . For my C # projects, I can see the Target Framework property.

+7
source share
4 answers

For a C # project, if you go to the project properties, you will find the Target Framework on the Application tab. Switch it to the .NET Framework 2.0 .

enter image description here

Try creating and deleting unsupported namespaces.

If you used any features related to .NET 4, you will have to fix them manually.

[Edit] As you already mentioned, you are using VB.NET.

For VB.NET go to the project properties, click Advanced Compile Options... on the Compile tab.

enter image description here

Select the target structure:

enter image description here

+16
source

Right-click the project in Solution Explorer and go to properties that modify the Target structure on the Application tab.

+2
source

In my experience, after switching the target structure, links to the base modules will not be updated.

For example, I switched from the C # 4.0 library back to 3.5 (so that I could work with SP2010) and found that it left CSharp.exe (build 4.0) as an undefined link.

I recreated it from scratch and found that the set of base links is different.

To be safe, I would recommend re-creating your project and re-adding the project files after.

But who knows, you might get lucky .: D Good luck!

0
source

I tried to upgrade my project from .net 2.0 to 4.0, and yes, the link is still targeting .net 2.0. Solution open the * .csproj file (project file) with notepad and change

 <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="2.0"> 

in

 <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> 

Hope for this help

0
source

All Articles