Solved

VS 2010 and framework 2.0

Posted on 2011-03-08
8
830 Views
Last Modified: 2012-06-21
Hello,

I'm a newbee in VS.

I developed a small aplication oo on VS 2010 C# framework 4.0 based on windows forms.

I need to compile it to framework 2.0 First I tried to compile with framework 2.0 on VS 2010 and it failed then I installed VS 2008 side by side and also failed.

The error message on VS 2008 framework 2.0 is :

An error occurred creating the configuration section handler for userSettings/WindowsFormsApplication4.Properties.Settings: Could not load file or assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified. (D:\MG\Visual Studio 2010\WindowsFormsApplication4\WindowsFormsApplication4\bin\Debug\WindowsFormsApplication4.vshost.exe.Config line 5)

The error message on VS2010 framework 2.0 é :

An error occurred creating the configuration section handler for userSettings/WindowsFormsApplication4.Properties.Settings: Could not load file or assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified. (D:\MG\Visual Studio 2010\WindowsFormsApplication4\WindowsFormsApplication4\bin\Debug\WindowsForm

How to compile it on framework 2.0 ?

Regards,

M

0
Comment
Question by:migav
8 Comments
 
LVL 52

Expert Comment

by:Carl Tawn
Comment Utility
In Visual Studio select Project > <yourproject>Properties from the main menu. In the dialog that appears, switch to "Application" then under the "Target Framework" dropdown select ".NET Framework 2.0".
0
 
LVL 53

Expert Comment

by:Dhaest
Comment Utility
Did you create the application directly with targetframework set to 2.0 ?
Did you add references to .net 4.0 components ?
0
 

Author Comment

by:migav
Comment Utility
Hello Carl,

Thanks,

The targuet framework was already 2.0.

Regards.
0
 

Author Comment

by:migav
Comment Utility
The application was created on framwork 4.0. When I changed the targuet framework to 2.0 I didn't suceed to compile on VS2010 neither VS2008.
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 52

Expert Comment

by:Carl Tawn
Comment Utility
Ok, then that suggests you are referencing some non-2.0 components. By the way, why do you need to target 2.0 if it was originally built for 4.0?
0
 

Author Comment

by:migav
Comment Utility
This app should run on a ws2003 with framework 2.0 (only). How to check if I'm using non 2.0 components ?
0
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 500 total points
Comment Utility
You need to remove all the references to the Framework 4.0.

Depending on how many forms/classes you have, it may be faster to create a brand new project targeting the Framework 2.0 right away and add your forms/classes to this new project.
0
 

Author Closing Comment

by:migav
Comment Utility
It works ! thank you so much !
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now