473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

System.Linq

Why does the compiler say that 'Linq' does not exist in the 'System'
namespace when specifying a using statement as follows:

using System.Linq;

----
Jun 27 '08 #1
6 15542
I try to add System.Core reference. But I cannot find System.Core
reference in
Reference of Visual Studio 2005. Please Help.
Jun 27 '08 #2
hon123456 wrote:
I try to add System.Core reference. But I cannot find System.Core
reference in
Reference of Visual Studio 2005. Please Help.
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.

Arne
Jun 27 '08 #3
On 4$B7n(B28$BF|(B, $B>e8a(B9$B;~(B35$BJ,(B, hon123456 <peterhon...@yahoo.com.hkwrote:
Why does the compiler say that 'Linq' does not exist in the 'System'
namespace when specifying a using statement as follows:

using System.Linq;
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
Visual
Studio 2005. Thanks.
Jun 27 '08 #4
hon123456 <pe*********@yahoo.com.hkwrote:
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
Visual Studio 2005. Thanks.
You can't. You need to use VS2008.

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

--
Jon Skeet - <sk***@pobox.com>
Web site: http://www.pobox.com/~skeet
Blog: http://www.msmvps.com/jon.skeet
C# in Depth: http://csharpindepth.com
Jun 27 '08 #5
Jon Skeet [C# MVP] wrote:
hon123456 <pe*********@yahoo.com.hkwrote:
>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
Visual Studio 2005. Thanks.

You can't. You need to use VS2008.

(There may be some hacky way, but it's unlikely to be a good
experience.)
And if one has to ask about this, then it is not even
worth trying ...

Arne
Jun 27 '08 #6
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.
Jul 1 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Dave Johnson | last post by:
Greetings, i want to be able to use linq new technology with sql server. the senario i am not able to do so far is as follow: 1- i program with linq 2- be able to generate and manipulate...
7
by: Chris | last post by:
I am a little confused. I have been reading about LINQ and it seems to imply LINQ is available in C# 3 but not in Visual Studio until the next release. I am a VB.net programmer but would still like...
4
by: hon123456 | last post by:
Dear all, I try to type using system.linq in Visual studio 2005. But it complains that no namespace of System.ling is found. Maybe I need to add reference to System.linq. How can I add...
1
by: Steve Wofford | last post by:
I am recieving the following. This happens when I moved it from my development system to our production SBS 2003 w/ latest .net frameworks and service packs . I developed under XPSP2 and VS2008. ...
4
by: Andrus | last post by:
Checking Client-only framework subset in VS2008 SP1 project properties causes in my application compile error The type 'System.Data.Linq.ITable' is defined in an assembly that is not...
14
by: thj | last post by:
Hi, I was wondering what you guys are using and why? LINQ to SQL or NHibernate? Thanks in advance, Tommy
2
by: Colin Han | last post by:
Hi, all, If I write follow code in c# method. The IDE will compile it to a complex construct method of System.Linq.Expression. Expression<Func<int>ex = () =10; will be compile to:...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.