tags:

views:

440

answers:

6

Hello,

Is it possible to convert some of the dlls of .Net framework 3.5 and use it in .Net framework 2.0?

I really need the managed named pipes namespace in .Net 2.0 :-(

Thanks

+1  A: 

You can use some of the features of .NET Framework 3.5 in .NET Framework 2.0 using LINQBridge, but not that particular namespace you mentioned AFAIK.

Mitch Wheat
+1  A: 

It depends on what features of .net 3.5 that dll is using. Most of the code is the same with the 2.0 version. Most of the Linq can be implemented is 2.0. BUT... there are some things that in 2.0 just will not work... you will have to try and see.

Lucas
+4  A: 

You can use the C# 3.0 compiler features in .NET 2.0 with a few tricks - but you aren't going to be able to use framework dlls / types / methods that don't exist in 2.0. I don't recommend trying to simply deploy any 3.5 dlls without having the client have .NET 3.5 installed. My expectation is that you'll have to install .NET 3.5 on the machine, or make do without the framework feature you want.

Marc Gravell
+1  A: 

Simple answer: No. :)

Jn
+3  A: 

Yes, you can. I've done it. I use System.Core, System.Xml.Linq, System.Data.Linq, and other 3.5 stuff on a Windows 2000 server with .NET 2.0

There's no need to 'convert' anything, 3.5 assemblies (green bits) target the 2.0 version of the CLR. What you need to do is install the latest service pack for .NET 2.0 (SP2 I think), that will update the red bits assemblies.

http://www.danielmoth.com/Blog/2007/06/net-framework-35.html

Max Toro
Care to explain what you mean by the "green bits" and "red bits"? Also, do you mean you supplied your own copies of those DLL's with your app?
Mystere Man
I've added a link. Yes to second question.
Max Toro
A: 

Here's a good blog post which (along with one or two following it) goes into detail about what you can use in .NET 2.0 with no changes, what you can't, and what you can with a workaround or two:

Using C# 3.0 from .NET 2.0

Kyralessa