using Linq with .NET 2.0

M

martin

I'm just wondering... Will it be possible to use C# 3.0 and Linq to
objects without having our users download the .NET Framework 2.0
client?

I really would like to use the C# 3.0 features, but I don't know that
it's worth making our customers download an extra 30 mb worth of
framework to use.

Thanks in advance,
Martin
 
L

Ludwig

I'm just wondering... Will it be possible to use C# 3.0 and Linq to
objects without having our users download the .NET Framework 2.0
client?

I really would like to use the C# 3.0 features, but I don't know that
it's worth making our customers download an extra 30 mb worth of
framework to use.

Thanks in advance,
Martin

C# 3.0 IS C# 2.0 plus the foundation extensions, so i don't think
anything will work without the .NET 2.0 framework!
 
M

martin

C# 3.0 IS C# 2.0 plus the foundation extensions, so i don't think
anything will work without the .NET 2.0 framework!

Right... my users will have the .NET framework 2.0 installed...
apologies... i mean .NET framework 3.5!!! OOPS!

Restated:

I'm just wondering... Will it be possible to use C# 3.0 and Linq to
objects without having our users download .NET Framework 3.5?

Sorry about that.
Martin
 
J

Jon Skeet [C# MVP]

martin said:
I'm just wondering... Will it be possible to use C# 3.0 and Linq to
objects without having our users download .NET Framework 3.5?

I suspect not - I believe some of the classes that syntactic sugar
boils down to are new to 3.5.
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

Restated:

I'm just wondering... Will it be possible to use C# 3.0 and Linq to
objects without having our users download .NET Framework 3.5?

No, they will have to download it.

IMO 3.4 and LINQ is still in the development stages, I would advise you
agains using it in a production environment. I would wait untli Orcas is
released.
 
M

Michael Nemtsev

Hello Jon Skeet [C# MVP],

Doesn't LINQ binary compatible with .NET 2.0?
LINQ apps run fine on .NET 2.0 platform without LINQ (now, at least)

---
WBR, Michael Nemtsev [C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

J> I suspect not - I believe some of the classes that syntactic sugar
J> boils down to are new to 3.5.
J>
 
J

Jon Skeet [C# MVP]

Michael Nemtsev said:
Doesn't LINQ binary compatible with .NET 2.0?
LINQ apps run fine on .NET 2.0 platform without LINQ (now, at least)

Are you sure? Without *any* new assemblies being present?

They don't need a new CLR, but I believe they need extra assemblies for
the new types.
 
W

Willy Denoyette [MVP]

Michael Nemtsev said:
Hello Jon Skeet [C# MVP],

Doesn't LINQ binary compatible with .NET 2.0?
LINQ apps run fine on .NET 2.0 platform without LINQ (now, at least)

It's hard to discuss non released product features, but it looks like you will need version
3.5 of the framework, you will also need v 9.0.xxxx of the C# compiler when compiling LINQ
enabled program files, v 8.0.50727 can't be used for this.
Willy.
 
M

Michael Nemtsev

Hello Jon Skeet [C# MVP],

AFAIK, u only need to ship the dependend assemblies (which are used in your
app) like System.Query.dll, System.Data.*.dll)
Nothing else

---
WBR, Michael Nemtsev [C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

J> Are you sure? Without *any* new assemblies being present?
J>
J> They don't need a new CLR, but I believe they need extra assemblies
J> for the new types.
J>
 
M

Michael Nemtsev

Hello Willy Denoyette [MVP],

Do you mean that downloading LINQ Preview now u get the update of compiler
to 9.0? seems not.
As I mentioned before everything compiling and works fine on .NET 2.0 and
VS 2005 (with dependent linq assemblies)

But it's only LINQ preview.
We can't know what will be undertaked futher

---
WBR, Michael Nemtsev [C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

W> W>
Hello Jon Skeet [C# MVP],

Doesn't LINQ binary compatible with .NET 2.0?
LINQ apps run fine on .NET 2.0 platform without LINQ (now, at least)
W> It's hard to discuss non released product features, but it looks like
W> you will need version
W> 3.5 of the framework, you will also need v 9.0.xxxx of the C#
W> compiler when compiling LINQ
W> enabled program files, v 8.0.50727 can't be used for this.
W> Willy.
 
J

Jon Skeet [C# MVP]

Michael Nemtsev said:
Do you mean that downloading LINQ Preview now u get the update of compiler
to 9.0? seems not.
As I mentioned before everything compiling and works fine on .NET 2.0 and
VS 2005 (with dependent linq assemblies)

But it's only LINQ preview.
We can't know what will be undertaked futher

You won't get any LINQ language support (as opposed to library support)
without an upgrade to the compiler. The LINQ preview has always used a
different or updated compiler - how else would it cope with the new
syntax?
 
J

Jon Skeet [C# MVP]

Michael Nemtsev said:
Hello Jon Skeet [C# MVP],

AFAIK, u only need to ship the dependend assemblies (which are used in your
app) like System.Query.dll, System.Data.*.dll)
Nothing else

That wouldn't surprise me, but I would also be surprised if you could
legally distribute those assemblies on their own. It would be a bit of
a support nightmare for MS, having "half" of .NET 3.5 installed...
 
W

Willy Denoyette [MVP]

Michael Nemtsev said:
Hello Jon Skeet [C# MVP],

AFAIK, u only need to ship the dependend assemblies (which are used in your app) like
System.Query.dll, System.Data.*.dll)
Nothing else

This is a not allowed and not supported scenario, more, doing this will break the current
install as the above DLL's have dependencies on updated/newer assemblies. Note also that the
above aren't exactly how LINQ is packaged in Orcas CTP V3.5 .

Willy.
 
M

Michael Nemtsev

Hello Jon Skeet [C# MVP],

J> You won't get any LINQ language support (as opposed to library
J> support) without an upgrade to the compiler. The LINQ preview has
J> always used a different or updated compiler - how else would it cope
J> with the new syntax?

yep. but how they cope with it in VS 2005 is definitly awfull. so it's reasonable
that they are going to sum all up in .NET 3.5 with the new VS
 
W

Willy Denoyette [MVP]

Michael Nemtsev said:
Hello Willy Denoyette [MVP],

Do you mean that downloading LINQ Preview now u get the update of compiler to 9.0? seems
not.
As I mentioned before everything compiling and works fine on .NET 2.0 and VS 2005 (with
dependent linq assemblies)

But it's only LINQ preview.
We can't know what will be undertaked futher


The preview is old hat, there have been several updates via the Orcas CTP's. Linq, Xlinq,
and other new stuff will definitely require V3.5 and the new compilers (C# and VB.NET), all
this will be part of the upcoming version of VS, C++/CLI won't support Linq (as a producer).

Willy.
 
M

martin

The preview is old hat, there have been several updates via the Orcas CTP's. Linq, Xlinq,
and other new stuff will definitely require V3.5 and the new compilers (C# and VB.NET), all
this will be part of the upcoming version of VS, C++/CLI won't support Linq (as a producer).

Willy.

I feel so very deceived... On every C9 interview folks would always
say "and it works with the .NET Framework 2.0 runtime" which of course
isn't REALLY true if you can't uncouple the runtime from the
libraries. I might add that Java actually lets you do this sort of
thing...

But I guess the real bummer is that I won't be able to use all that
great new stuff for a very long time. Soma did say "The change is in
name only and will not affect the technologies being delivered as part
of the product. " about the .NET 3.0 rename...

Martin
 
J

Jon Skeet [C# MVP]

martin said:
I feel so very deceived... On every C9 interview folks would always
say "and it works with the .NET Framework 2.0 runtime" which of course
isn't REALLY true if you can't uncouple the runtime from the
libraries. I might add that Java actually lets you do this sort of
thing...

Not really. For instance, you can't compile generics with a pre-1.5
compiler, and you can't use the enhanced "for" loop or enums against a
pre-1.5 JRE unless you add some types in yourself.

Likewise you can't use assertions with a pre-1.4 JRE.

Not affecting the CLR itself is a big deal, IMO, even if you do need
new libraries. The requirement of new libraries shouldn't really be a
surprise to anyone.

Java IDEs *do* tend to be a lot better at targeting multiple runtimes,
however, including runtimes which are later than what they were built
against. For instance, Eclipse will let you target any JRE on your
system, whereas before MS BEE, VS 2005 would only target .NET 2+. That
was a big mistake on Microsoft's part, IMO.
 
W

Willy Denoyette [MVP]

martin said:
I feel so very deceived... On every C9 interview folks would always
say "and it works with the .NET Framework 2.0 runtime" which of course
isn't REALLY true if you can't uncouple the runtime from the
libraries. I might add that Java actually lets you do this sort of
thing...

But I guess the real bummer is that I won't be able to use all that
great new stuff for a very long time. Soma did say "The change is in
name only and will not affect the technologies being delivered as part
of the product. " about the .NET 3.0 rename...

Martin


Adding to what Jon said, you need to make a clear distinction between the Runtime (commonly
called the CLR) and the Framework.
For instance V3 of the Framework is a completely new set of classes, installed in a path
separated from the base V2 FCL. However, V3 of the framework doesn't need a new version of
the runtime, it runs on V2.
V3.5 on the other hand, will include:
- a set of *new classes* plus *extensions to existing classes*, again stored in a path
separate from the base V2 FCL
- some upgraded tools like the compilers, required by the new features like LINQ and
LamdaExpressions .
- an upgrade of the runtime.

The latter two will, AFAIK, also be made available through the upcoming SP for V2 of the
framework.
The new version of VS will include all versions of the framework (V2, V3 and V3.5) and will
target V2, V3 and V3.5 on a per project basis.

Willy.
 
M

martin

Adding to what Jon said, you need to make a clear distinction between the Runtime (commonly
called the CLR) and the Framework.
For instance V3 of the Framework is a completely new set of classes, installed in a path
separated from the base V2 FCL. However, V3 of the framework doesn't need a new version of
the runtime, it runs on V2.
V3.5 on the other hand, will include:
- a set of *new classes* plus *extensions to existing classes*, again stored in a path
separate from the base V2 FCL
- some upgraded tools like the compilers, required by the new features like LINQ and
LamdaExpressions .
- an upgrade of the runtime.

The latter two will, AFAIK, also be made available through the upcoming SP for V2 of the
framework.
The new version of VS will include all versions of the framework (V2, V3 and V3.5) and will
target V2, V3 and V3.5 on a per project basis.

Willy.- Hide quoted text -

- Show quoted text -

I get it... I'm just bummed out that I won't be able to use it for a
few years. And I don't think it's ridiculous to ask to be able to
ship the framework without the 30 megs that the W*F classes add.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top