Solved

Will my .NET 2.0 app work under .NET Framework 3.0 and 3.5?

Posted on 2007-11-27
16
588 Views
Last Modified: 2013-12-16
Hi,

I'm wondering if my .NET 2.0 app will work under .NET Framework 3.0 and 3.5 without having to install .NET Framework version 2.0.
0
Comment
Question by:EEssam
  • 8
  • 4
  • 3
  • +1
16 Comments
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20359548
no, it won't
You can recompile to fx3.0 or 3.5 and make some changes, or you have to install 2.0.
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20359554
BTW, VS deployment options allows you to generate an installer with .net framework included.
0
 
LVL 7

Expert Comment

by:prosh0t
ID: 20359745
I haven't tried it, but you might try downloading visual studio C# express 2008 and have it automatically convert your code.  (It's FREE by the way.. yes I know it's hard to believe but it's a limited version of visual studio).  Usualy VS can easily import old .net code into the new version and then you can compile it there and have a 3.5 .exe.  The only question would be if the free version allowed for the conversion.  here's the link:

http://www.microsoft.com/express/download/
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20359838
>>but you might try downloading visual studio C# express 2008 and have it automatically convert your code
This will convert the solution, it won't change the framework version.

But you can create a new 3.0 project/solution, and attach your source files.
0
 
LVL 7

Expert Comment

by:prosh0t
ID: 20359850
If you recompile it will change the framework version
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20359894
>>If you recompile it will change the framework version
AS you said, you have never tried. If you load and recompile a 2.0 project in VS 2008 you will have a 2.0 executable!!!
0
 
LVL 7

Expert Comment

by:prosh0t
ID: 20359942
I've done it from 1.1 to 2.0 plenty of times.  VS converts the solution, I recompile, vioala, I have a 2.0 .exe with no code changes.  Did Microsoft take that functionality out of vs 2008 when vs 2005 did it fine?


0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20360007
you are just assuming.
VS2005 suports just .net framework 2.0 and 3.0, not 1.x, that why it migrates
VS2008 support .net framework 2.0, 3.0 and 3.5, there is not reason to migrate
0
 
LVL 8

Expert Comment

by:slado2
ID: 20360008
You don't have to recompile it. .NET 3.0 and 3.5 are based on .NET 2.0 and are fully backward compatible. NET 3.5 = new features + .NET 3.0 = WPF + WCF + .NET 2.0
It is different than .NET 1.0 (or 1.1) and 2.0 - those were really different frameworks with different libraries.
NET 3.0 and 3.5 are just add-on to .NET 2.0.
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20360040
The question:
I'm wondering if my .NET 2.0 app will work under .NET Framework 3.0 and 3.5 without having to install .NET Framework version 2.0.
Answer:
NO

About migrating, to produce a 3.x executable you have to recompile, there is not a magic convertion.
Before recompiling, there would be minimal or no change at all in source code, but YOU HAVE TO RECOMPILE!!!
0
 
LVL 7

Expert Comment

by:prosh0t
ID: 20360042
k, I concede.  I didn't know each version of VS supported multiple frameworks.  Just curious.. how do you specify which framework you are using when you create a new project in VS 2005?  Lets say I wanted to create a 3.0 app instead of 2.0 (which it does by default for me).
0
 
LVL 8

Expert Comment

by:slado2
ID: 20360070
You can't install .NET 3.0 or 3.5 without having .NET 2.0 installed too.
VS 2005 supports creating only .NET 2.0 applications. (.NET 3.0 is supported via addons)
VS 2008 supports .NET 2.0, 3.0 and 3.5.
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20360085
when you create a new project in VS2008, you are asked about the framework version.
0
 

Author Comment

by:EEssam
ID: 20360454
slado2 says: You can't install .NET 3.0 or 3.5 without having .NET 2.0 installed too. Which means: my .NET 2.0 app work under .NET Framework 3.0 and 3.5.

I'm lost.
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20360551
no, your application just run with 2.0, even if 3.x is installed
0
 
LVL 8

Accepted Solution

by:
slado2 earned 500 total points
ID: 20363771
Assume you have plain computer with just windows installed.
1. Download NET Framework 3.5 Redistributable from http://download.microsoft.com/download/6/0/f/60fc5854-3cb8-4892-b6db-bd4f42510f28/dotnetfx35.exe
2. Install it
3. .NET 2.0, .NET 3.0 and .NET 3.5 will be installed (you may check it in c:\windows\microsoft.net\framework

NET 3.5 and 3.0 are NOT standalone products. Just add-ons to NET 2.0.



0

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
asp web application 3 35
Where does legacy ASP.NET initialize language? 2 55
pressing download button in c# 7 34
global Variable - 2 functions in powershell 1 19
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

685 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