Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
how do i enable using system.linq
namespace does not exist message
im using VS 2015 RC
Posted
Comments
Sergey Alexandrovich Kryukov 3-Aug-15 10:51am    
This is because you don't understand the basics: assemblies and namespaces. You cannot "use using". Using is nothing but syntactic sugar which helps you to shorten top-level type names. To really use an assembly, you have to reference it.
—SA
jamesmc1535 3-Aug-15 11:04am    
i know as you can see i asked how do i enable it , cos i cant find system.core under add > refrence
Sergey Alexandrovich Kryukov 3-Aug-15 11:19am    
Create a new project from scratch (from a template). Can you see System.Core now?
—SA
jamesmc1535 3-Aug-15 11:21am    
no , as a matter of fact my program i made in framework 3.0 which isnt supported, so ima just change it to 4.5 then it will work,
Sergey Alexandrovich Kryukov 3-Aug-15 11:23am    
Certainly, in older .NET, there were no LINQ. :-)
—SA

1 solution

I have tried using the same in Visual Studio 2015 and it works. Just make sure that you are referencing the System.Core.dll library in your project, that is where System.Linq is declared in.

Double-click References and check if System.Core is present in the list, if not then Right-click on Reference, and select Add Reference. From the window opened, select System.Core and click Add. That way, now if you try to use the namespace (hopefully by using System.Linq;) it would work.

For more about this namespace please read: https://msdn.microsoft.com/en-us/library/system.linq(v=vs.111).aspx[^]
 
Share this answer
 
v2
Comments
jamesmc1535 3-Aug-15 10:31am    
thanks
Afzaal Ahmad Zeeshan 3-Aug-15 10:32am    
You're most welcome.
jamesmc1535 3-Aug-15 10:48am    
System.Core.dll < cant find it
refrence>add refrence>assemblies>framewor> its not there
Afzaal Ahmad Zeeshan 3-Aug-15 10:59am    
In my case, it is present there. Make sure your framework is installed without any problem.
Sergey Alexandrovich Kryukov 3-Aug-15 10:52am    
5ed, but... the inquirer probably lacks more basic understanding. Please see my comment to the question.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900