views:

176

answers:

3

Is there anyway to make it possible to use .net 3.0 namespaces in a .net 2.0 application? I'm specifically looking to use the System.Windows.Media.Media3D namespace.

Edit: I am looking to use the actual assemblies, not just the namespaces. Poor wording on my part.

A: 

Are you trying to use the namespaces or the code? You can use the namespaces for whatever you want, so long as you don't import the applicable DLLs. That would cause a spaghetti code nightmare, but you can do it.

As I'm sure you figured out, no you cannot use the 3.0 code... or you'd have to call it a ".Net 3.0 application".

Greg Hurlman
I'm looking to use the DLLs, sorry for the poor wording.
I was pretty sure this was the case, just wanted to make sure before I go out and find a graphics package. Thanks.
+1  A: 

No, you cannot use new .NET 3.0 in your .NET 2.0

It's just that simple

TravisO
A: 

.NET 2.0 and .NET 3.0/3.5 all use the same 2.0 .NET runtime. 3.0 added WCF WPF WF and Cardspace, 3.5 Added Linq et al. via libraries only.

If you are using VS2008 you can compile applications using csharp 3.0 features (lambdas, anonymous types, anonymous methods, etc) and still run them on the 2.0 runtime as long as you set your project to target the 2.0 framework.

In order to use functionality from one of the libraries in 3.0 the user would need to have the 3.0 framework installed.

I guess if you are able to be more specific on what you mean by a 2.0 application it would be helpful. Do you mean your application needs to be able to run without 3.0 and 3.5 installed? Do you mean that your boss won't let you change the rolldown in the project settings to 3.0?

joshperry