Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

VS 2010 and framework 2.0

Posted on 2011-03-08
8
Medium Priority
?
851 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 35068616
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
ID: 35068624
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
ID: 35068631
Hello Carl,

Thanks,

The targuet framework was already 2.0.

Regards.
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:migav
ID: 35068650
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
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 35068652
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
ID: 35068716
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 70

Accepted Solution

by:
Éric Moreau earned 2000 total points
ID: 35068741
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
ID: 35068852
It works ! thank you so much !
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

610 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