Cannot find using System.Data.Linq

Just to confirm that Adding the reference to the project didn't work for me because it was already selected.

However, selecting "Copy Local, True" in the Properties pane for the reference made it start working.


That namespace is LINQ-to-SQL, so you'll also need to add a reference to System.Data.Linq.dll; it won't be added by default just by adding Entity Framework.


Right click your solution/project. Click Add Reference and search for System.Data.Linq and add the reference there and it should compile.


Try re-change target framework for your project.

Go to Proporties > Application > Target Framework change to another than used now, and next change it back.

Tags:

C#

Linq