LINQ on the.NET 2.0 Runtime

Can a LINQ made it possible for application work on an equipment that just has the.NET 2.0 runtime mounted?

Theoretically, LINQ is absolutely nothing greater than syntactic sugar, and also the resulting IL code need to look the like it would certainly have in.NET 2.0.

Just how can I write LINQ without making use of the.NET 3.5 collections? Will it run on.NET 2.0?

0
2019-05-09 11:11:49
Source Share
Answers: 4

No, due to the fact that while you assumed LINQ is actually simply syntactic sugar, it in fact greatly made use of expression trees - - an attribute lacking in.NET 2.0.

That being said.NET 3.5 just accumulates ahead of.NET 2.0, which's the reason that the IL does not look "various" or "unique".

I do not see a reason that you should not simply install the.NET 3.5 Framework. Everything.NET 2.0 will certainly function great on it, assure :)

0
2019-05-10 06:03:48
Source

In concept of course, given you disperse the LINQ details settings up and also any kind of dependences. Nonetheless that remains in offense of Microsoft's licensing. Scott Hanselman created a post concerning Deploying ASP.NET MVC on ASP.NET 2.0 which resembles what you are intending to do.

0
2019-05-10 06:03:04
Source

As much as I recognize the LINQ collection is just readily available given that the structure 3.0. If you intend to make use of something comparable in the structure 2.0, you would certainly require to rewritte it on your own :) or locate a comparable 3rd - event collection. I just located a little details here yet it really did not persuaded me either.

0
2019-05-10 06:00:28
Source

There are some "Hacks" that entail making use of a System.Core.dll from the 3.5 Framework to make it run with.net 2.0, yet directly I would certainly not desire usage such a rather unsteady structure.

See below : LINQ support on .NET 2.0

  1. Create a new console application
  2. Keep just System and also System.Core as referenced settings up
  3. Set Copy Local to real for System.Core, due to the fact that it does not exist in.NET 2.0
  4. Use a LINQ question generally method. As an example the one listed below.
  5. Construct
  6. Copy all the container result to an equipment where only.NET 2.0 is mounted
  7. Run

(Requires.net 2.0 SP1 and also I have no suggestion if packing the System.Core.dll goes against the EULA)

0
2019-05-10 05:41:21
Source