VS2005 and LINQ

R

Rainer Queck

Hello NG,

Is it possible to use LINQ together with VS2005?
If yes I assume I need some AddIns. Where can I find then?

Thanks for hints and links.

Regards
Rainer Queck
 
J

Jon Skeet [C# MVP]

Rainer Queck said:
Is it possible to use LINQ together with VS2005?
If yes I assume I need some AddIns. Where can I find then?

Thanks for hints and links.

Well, there's all the old betas and CTPs which worked on VS2005 - but
they're all out of date.

Basically you need VS2008.
 
M

Marc Gravell

If possible (I haven't tried) it would be extremely tricky; in
particular, to write "where" clauses on IQueryable<T> etc requires the
construction of an "Expression"; this is not something I would want to
have to do routinely, especially for non-trivial queries. The lack of
anon-types would be irritating but not insurmountable.

If you just mean LINQ-to-objects you might *just* be able to get it
working with anon methods instead of using lambdas for the predicates/
selectors, but you'd need to use the long syntax to the extension
methods *and* you'd need to write backwards:
select(orderby(where(from))) [but much longer].

Basically, I wouldn't try it. I strongly suggest using 2008; the
express edition may do most of what you want? Note that in either case
you will want to reference the .NET 3.5 assemblies; you can't avoid
this necessity.

Marc
 
R

Rainer Queck

Hello Marc,

thanks for your information. Actually I am using VS2008, but I have a
Classlibrary-Project in use, some one would like to add to his project too.
Unfortunatelly he is still using VS2005 and his "Boss" is - momentarely -
not willing to upgrade to VS2008 :-(

Well I guess if he wants to make use of my library source code, he will have
to extract the code needed and build a library for his own.
Luckily he needs no modules, using LINQ.

Thanks
Rainer Queck
 
J

Jon Skeet [C# MVP]

Rainer Queck said:
thanks for your information. Actually I am using VS2008, but I have a
Classlibrary-Project in use, some one would like to add to his project too.
Unfortunatelly he is still using VS2005 and his "Boss" is - momentarely -
not willing to upgrade to VS2008 :-(

Well I guess if he wants to make use of my library source code, he will have
to extract the code needed and build a library for his own.
Luckily he needs no modules, using LINQ.

Hang on - so he doesn't actually need to use LINQ? In that case why
can't he just reference your DLL?
 
R

Rainer Queck

Hello Jon,

Jon Skeet said:
Hang on - so he doesn't actually need to use LINQ? In that case why
can't he just reference your DLL?
Because he wants to use my source code as well.

Regards
Rainer
 
I

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

Rainer Queck said:
Hello Marc,

thanks for your information. Actually I am using VS2008, but I have a
Classlibrary-Project in use, some one would like to add to his project
too. Unfortunatelly he is still using VS2005 and his "Boss" is -
momentarely - not willing to upgrade to VS2008 :-(

Well I guess if he wants to make use of my library source code, he will
have to extract the code needed and build a library for his own.
Luckily he needs no modules, using LINQ.

Now you confused me, what about the original question regarding linq?
Or why is linq mentioned at all ?
 
R

Rainer Queck

Hello Ignacio,

Ignacio Machin ( .NET/ C# MVP ) said:
Now you confused me, what about the original question regarding linq?
Or why is linq mentioned at all ?
In parts of my classlibrary I make use of LINQ, but it is a part not needed
by the "other one".
So it would come in handy, if he could just build his own VS2005 class
librayr by assimilating my code.
But as it looks now, he must remove the parts of my code, which uses LINQ.

Regards
Rainer
 
R

Rainer Queck

Hi once more,

Ignacio Machin ( .NET/ C# MVP ) said:
Make it simple, download VS2008 Express edition
Well, the one who wants to use my class library, would like to add it to his
solution which is a "not that small" project under VS2005 pro AND
because of his boss, he can't switch to VS2008.

Regards
Rainer
 
V

viepia

With Microsoft DreamSpark as a student VS2008 should be free.
http://news.xinhuanet.com/english/2008-02/20/content_7633285.htm

Viepia



Hello Marc,

thanks for your information. Actually I am using VS2008, but I have a
Classlibrary-Project in use, some one would like to add to his project too.
Unfortunatelly he is still using VS2005 and his "Boss" is - momentarely -
not willing to upgrade to VS2008 :-(

Well I guess if he wants to make use of my library source code, he will have
to extract the code needed and build a library for his own.
Luckily he needs no modules, using LINQ.

Thanks
Rainer Queck

Marc Gravell said:
If possible (I haven't tried) it would be extremely tricky; in
particular, to write "where" clauses on IQueryable<T> etc requires the
construction of an "Expression"; this is not something I would want to
have to do routinely, especially for non-trivial queries. The lack of
anon-types would be irritating but not insurmountable.

If you just mean LINQ-to-objects you might *just* be able to get it
working with anon methods instead of using lambdas for the predicates/
selectors, but you'd need to use the long syntax to the extension
methods *and* you'd need to write backwards:
select(orderby(where(from))) [but much longer].

Basically, I wouldn't try it. I strongly suggest using 2008; the
express edition may do most of what you want? Note that in either case
you will want to reference the .NET 3.5 assemblies; you can't avoid
this necessity.

Marc
 

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