Solved

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

Posted on 2007-11-27
16
586 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Keyboard 2 32
Why does my excel data start at B1 instead of A1. 9 80
VB.Net Report Printing Issue 3 30
No Data for DropDown List 2 22
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

815 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

12 Experts available now in Live!

Get 1:1 Help Now