• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 858
  • Last Modified:

VS 2010 and framework 2.0

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
migav
Asked:
migav
1 Solution
 
Carl TawnSystems and Integration DeveloperCommented:
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
 
DhaestCommented:
Did you create the application directly with targetframework set to 2.0 ?
Did you add references to .net 4.0 components ?
0
 
migavAuthor Commented:
Hello Carl,

Thanks,

The targuet framework was already 2.0.

Regards.
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
migavAuthor Commented:
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
 
Carl TawnSystems and Integration DeveloperCommented:
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
 
migavAuthor Commented:
This app should run on a ws2003 with framework 2.0 (only). How to check if I'm using non 2.0 components ?
0
 
Éric MoreauSenior .Net ConsultantCommented:
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
 
migavAuthor Commented:
It works ! thank you so much !
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now