.NET Framework - System.Linq

Asked By hon123456 on 29-Apr-08 06:35 AM
Why does the compiler say that 'Linq' does not exist in the 'System'
namespace when specifying a using statement as follows:

using System.Linq;


hon123456 replied on 29-Apr-08 06:35 AM
I try to add System.Core reference. But I cannot find System.Core
reference in
Reference of Visual Studio 2005. Please Help.
arn replied on 27-Apr-08 09:46 PM
VS 2005 is for .NET 2.0 - System.Core is new in .NET 3.5 - you
should be able to find it in VS 2008.

hon123456 replied on 29-Apr-08 06:35 AM
I am using Visual Studio 2005. Any method to Add System.Core. I know
System Core is in .Net Framework 3.5. How can I add System.Core to
Studio 2005. Thanks.
Jon Skeet [C# MVP] replied on 28-Apr-08 01:17 AM
You can't. You need to use VS2008.

(There may be some hacky way, but it's unlikely to be a good

Jon Skeet - <skeet@pobox.com>
Web site: http://www.pobox.com/~skeet
Blog: http://www.msmvps.com/jon.skeet
C# in Depth: http://csharpindepth.com
arn replied on 28-Apr-08 06:57 PM
And if one has to ask about this, then it is not even
worth trying ...

Oleg Polkovsky replied on 01-Jul-08 02:57 PM
I can suggest you an idea how to add the reference to System.Linq in a C# project. I'm not sure if it works in C# 2005, but it solves the problem in C# 2008.

1) Launch the C# 2008 environment and create or open the necessary project.

2) In the Solution Explorer section, find the node with the name of your project and right-click this node. A context menu will appear, and you have to choose the "Add Reference" option in this menu.

3) You'll see a window called "Add Reference". It has some pages (".NET", "COM", etc.). The first page (".NET") must be opened.

4) In the list below, find the component "System.Core", select it and click "OK".

5) Now you may type "using System.Linq" link in the Code Editor.
Ted Robinson replied on 28-Jan-09 11:52 AM
To use it the project must be net 3.5 change in properties and you will see it this is in VS 2008
Senthil Ganesh replied on 24-Mar-09 10:10 AM
My application in VS# 2005,Is there any way to use
"System.Core"....in VS#2005.Help me..
Rajesh kumar replied to hon123456 on 25-May-10 04:41 AM
I try to add System.Core reference. But I cannot find System.
Owais Owais replied to Oleg Polkovsky on 11-Nov-10 01:54 PM
Thanks a bunch........
Owais Owais replied to Oleg Polkovsky on 11-Nov-10 01:56 PM
Thanks alot..........