Link to home
Create AccountLog in
Avatar of Xtreem
XtreemFlag for United Kingdom of Great Britain and Northern Ireland

asked on

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]
SOLUTION
Avatar of Jai S
Jai S
Flag of India image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Xtreem

ASKER

>> "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.
ASKER CERTIFIED SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Xtreem

ASKER

>> "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).
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Xtreem

ASKER

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)?
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.
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Xtreem

ASKER

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...
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).
Avatar of Xtreem

ASKER

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...
I develop .Net 3.0 applications on Windows XP and use it on Win XP everyday :)
I used WCF and WF

Avatar of Xtreem

ASKER

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?...
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Xtreem

ASKER

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.
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Xtreem

ASKER

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...
Does that mean your question is answered? :)
Avatar of Xtreem

ASKER

I think so... Thanks for your help!!!
Avatar of Xtreem

ASKER

Increasing points...