I need to use linq in C# Windows form application working with .Net Framework 2 not 3.5 . I Know it may be some sort of stupidity to do that. but i need that for some special reasons. Can i import just linq libraries to my project by anyway ? or there is no way except for using 3.5 ?
Great Answer but, isn't there any way to do that for Linq to SQL ?? as this method doesn't seem to implement Linq to SQL
EgyEast
2010-10-06 14:51:20
I'm not sure. The blog post that Justin links to suggests that it's possible if you're running 2.0sp1.
LukeH
2010-10-06 14:58:38
You just saved my day. Thanks!
mizipzor
2010-10-06 15:12:21
+3
A:
There are several blogs which outline this process (yes, it can be done):
Justin Niessner
2010-10-06 12:40:50
A:
The core of the framework 3.5 is the same as the core of framework 2.0 For instance you can create a solution with vs 2008 where your front-end project or user interface will compile with the framework 2.0, and a core dll project with framework 3.5 that uses linq extensively. The whole thing can be deployed in a 2.0 environment without problems.
eloycm
2010-10-06 15:05:35
The core of the framework might be the same, but LINQ is 3.5 only. So it won't run on a machine with only .NET 2.0 (other than by using the workaround/hack linked by @Justin)
Matt Warren
2010-10-06 15:29:23
LINQ is a language feature, so you need the VB9 compiler to compile it, but the resulting IL is compatible with v2.0 of .Net. If you used any classes or namespaces that were unique to 3.5, then you would need 3.5 installed.
Chris Dunaway
2010-10-07 17:36:35