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

How do I switch application to use .NET Framework 3.0 and then can it be run on a system with 2.0 installed?

I have an application that has been developed using .NET Framework 2.0.  I have since installed .NET Framework 3.0 on my development machine.  How do I now change my application to use 3.0 instead?

And can it then be run on a target machine that does not have 3.0 installed (only 2.0 is installed)?

[From http://en.wikipedia.org/wiki/.NET_Framework, 3.0 is backward compatible with 2.0 and uses version 2.0 of the CLR.  Also, my application doesn't use any of the new 3.0 components: WPF, WCF, WWF, WCS]
0
Xtreem
Asked:
Xtreem
  • 10
  • 6
  • 3
  • +1
6 Solutions
 
Jai STech ArchCommented:
How do I now change my application to use 3.0 instead?
- you just open it with the 3.0 framework

as it says it is backward compatible...if you dont use the 3.0 functions...then you have the answer
0
 
XtreemAuthor Commented:
>> "you just open it with the 3.0 framework"

What do you mean by this?  I'm not talking about run-time here, I'm talking about design-time.  I have both 2.0 and 3.0 installed on my development machine.  When I open the solution/project in Visual Studio 2005 and when I build it, how do I ensure that it uses 3.0 as opposed to 2.0?


>> "as it says it is backward compatible...if you dont use the 3.0 functions...then you have the answer"

Yes, it says it is backward-compatible, but that's not to say an application built using 3.0 can be run on a target system with only 2.0 installed.  This could easily mean (and probably does mean) that an application built using 2.0 can be run a target system with 3.0 installed.  My situation is that I wish to run my application, which I wish to build using 3.0, on a system with only 2.0 installed.
0
 
surajgupthaCommented:
I agree with jaiganeshsrinivasan.
Since your application was developped using after .net 3.0 was isntalled on your machine but doesnt use the 3.0 components, you should be able to run it in computers that have just 2.0 installed in them.

If your's were a windows app when you double click ur application, the CLR which is 2.0 takes over and would run ur application. since it doesnt see any 3.0 libraries, in my opinion it would just work. I have tried it and it worked for me.
0
Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

 
XtreemAuthor Commented:
>> "Since your application was developped using after .net 3.0 was isntalled on your machine"

No, I think you misread.... I wrote in my Question "I have an application that has been developed using .NET Framework 2.0.  I have SINCE installed .NET Framework 3.0 on my development machine."

The solution/project was created on my machine before 3.0 was installed.  Is there some sort of setting somewhere in my project that I can just set to use 3.0 instead of 2.0?
The reason I want to do this is so that in the future, if I want to use any 3.0-specific components, I can.  And I prefer to use the latest version of the .NET Framework (despite the fact customers may only have 2.0 installed on their system).
0
 
mastooCommented:
I've wondered the same thing.  My limited research looks like you need to download/install the .Net Framework 3.0 sdk and then you can reference that from your projects instead of 2.0.  Requires >= VS 2005
0
 
XtreemAuthor Commented:
I have VS 2005.  So, basically, to switch from 2.0 to 3.0 of the SDK, I need to remove all my 2.0 references in my project workspace (visible under 'References' in Solution Explorer) and re-add all them references using version 3.0.0.0 of the same (I am assuming it will show them as 3.0.0.0 even though the CLR in .NET Framework 3.0 is still at version 2.0 - correct me if I'm wrong)?
0
 
mastooCommented:
I was hoping somebody else might chime in since I haven't actually tried this yet, but yes - it looked like you would install the 3.0 framework sdk and change your references as you said.  You'd think google would get a top hit on a nice explanation about this but I had little success last time I tried.
0
 
surajgupthaCommented:
@ Extreem
why do u want to reference to 3.0 DLL's if you are not using any specific functionality in them currently?? In the future if u want to use anything related to 3.0, just include the 3.0 dll's to your project on a need basis.

Moreover if you notice from your add reference .net tab and sort it by version so you can see all 3.0000 DLL's you would just notice a handful of them and they are related to wither WCF/ Worflow/ WPF.
0
 
XtreemAuthor Commented:
I need a sanity check...

There are three relevant downloads from the Microsoft website in relation to .NET Framework 3.0...

1. Microsoft® Windows® Software Development Kit for Windows Vista" and .NET Framework 3.0 Runtime Components
http://www.microsoft.com/downloads/details.aspx?FamilyId=C2B1E300-F358-4523-B479-F53D234CDCCF&displaylang=en

2. Microsoft® Windows® Software Development Kit Update for Windows Vista"
http://www.microsoft.com/downloads/details.aspx?familyid=4377f86d-c913-4b5c-b87e-ef72e5b4e065&displaylang=en

3. Microsoft .NET Framework 3.0 Redistributable Package
http://www.microsoft.com/downloads/details.aspx?FamilyId=10CC340B-F857-4A14-83F5-25634C3BF043&displaylang=en


I've read the the descriptions for 1. and 2. and I have surmised that 2. supercedes 1. However, I installed 1., then found that I didn't get any of the handful of 3.0.0.0 DLLs in my 'Add Reference->.NET' tab that you mentioned surajguptha (even after running "Program Files\Microsoft SDKs\Windows\v6.0\Setup\VCIntegrate.exe"). Then I uninstalled and installed 2. But I still have the same problem... Not sure what's going on now...

I've read http://msdn2.microsoft.com/en-us/library/aa480198.aspx, which seems to answer confirm that applications developed using 2.0 can be happily run on machines with 3.0 installed. And just so you know, I want to use the Exception Handling Application Block which, according to http://www.microsoft.com/downloads/details.aspx?familyid=4C557C63-708F-4280-8F0C-637481C31718&displaylang=en, requires that 3.0 is installed on the target system. And I'd rather not just distribute the required DLLs for this particular component - I think it's better to ask customers to install .NET Framework 3.0 - especially now I know it's completely backward-compatible with 2.0...
0
 
mastooCommented:
I read the link #2 closer and it seems to say you can only develop .Net 3.0 apps under Vista (although they can deploy to other platforms).
0
 
XtreemAuthor Commented:
Ah, I see. Why does it let me install the whole thing in the first place then!? That's a rhetorical question by the way. I take it this is why the 3.0.0.0 DLLs don't appear in my 'Add Reference->.NET' tab...
0
 
surajgupthaCommented:
I develop .Net 3.0 applications on Windows XP and use it on Win XP everyday :)
I used WCF and WF

0
 
XtreemAuthor Commented:
Ok, that makes sense - I don't see why I can't develop using .NET Framework 3.0 on Win XP... but I still don't get why this handful of 3.0.0.0 DLLs in my 'Add Reference->.NET' tab doesn't appear? I've installed both of the following:

 - Microsoft® Windows® Software Development Kit Update for Windows Vista"
   http://www.microsoft.com/downloads/details.aspx?familyid=4377f86d-c913-4b5c-b87e-ef72e5b4e065&displaylang=en

 - Microsoft .NET Framework 3.0 Redistributable Package
   http://www.microsoft.com/downloads/details.aspx?FamilyId=10CC340B-F857-4A14-83F5-25634C3BF043&displaylang=en

And even run "Program Files\Microsoft SDKs\Windows\v6.0\Setup\VCIntegrate.exe", but to no avail. Any ideas?...
0
 
XtreemAuthor Commented:
Ah, it's becoming more clearer now. I also found this:
http://www.microsoft.com/downloads/details.aspx?familyid=5D61409E-1FA3-48CF-8023-E8F38E709BA6&displaylang=en

So, these extensions are required for WCF, WPF and WWF. You must have these listed in your 'Add Reference->.NET' tab because you've installed these extensions. So, maybe the .NET Framework 3.0 SDK I've installed is integrated with my VS 2005 but without the WCF, WPF and WWF stuff. For instance, I can see "Microsoft Tablet PC Ink Analysis WinFx Library" as Version 3.0.0.0 (the only one with that version) in my list. Does this mean I'm making a fuss about nothing?

Just so you know, I installed the second link you put initially, and replaced it with this one instead:
http://www.microsoft.com/downloads/details.aspx?familyid=4377f86d-c913-4b5c-b87e-ef72e5b4e065&displaylang=en

From what I can gather, they essentially amount to the same thing as far as .NET Framework 3.0 is concerned. The 'replacement' (or "Update") one just updates the Windows Vista elements of the SDK.
0
 
surajgupthaCommented:
In short, i would say you will have no problems in running applications on .net 2.0 when developped on a machine with .net 3.0 if you havent used any specific .net 3.0 dll's
0
 
XtreemAuthor Commented:
Yeah, I appreciate that now. But http://www.microsoft.com/downloads/details.aspx?familyid=4C557C63-708F-4280-8F0C-637481C31718&displaylang=en says under "System Requirements":

Microsoft .NET Framework 2.0 or 3.0. You need .NET Framework 3.0 for ... Exception Handling Application Block

So, I guess I will still have to expect customers to install .NET Framework 3.0 to run my application. With .NET Framework 2.0, Exception Handling Application Block was added to my solution as a project then my application that used it referenced it (under 'Add References->Projects')... I suspect it will be the same for .NET Framework 3.0 - that's why it doesn't appear under 'Add References->.NET'.

I'm in the process of installing 'Enterprise Library 3.1 - May 2007' now...
0
 
surajgupthaCommented:
Does that mean your question is answered? :)
0
 
XtreemAuthor Commented:
I think so... Thanks for your help!!!
0
 
XtreemAuthor Commented:
Increasing points...
0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

  • 10
  • 6
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now