When LINQ Intellisense Does Not Work
When you are using some LINQ-enabled object and you put that dot (.) and no intellisense menu is shown , You start to scratch your head and wonder why. Moreover, at least the methods inherited from (object) class should be shown but there is no intellisense menu to check the members it references.
This happened to me today – just like you – when I was accessing a LINQ-to-SQL EntitySet object and I lost a full 10 minutes of my life checking my ORM generated class members and my LINQ-to-SQL (*.dbml) model and the relationships in my SQL Server database.
Hmmm…. here it comes…the
I decided to write my code without depending on the absent (must be there though) intellisense, and compiled my project, then Visual Studio told me to add a reference for the assembly (System.Data.Linq) to my project, once I did that, LINQ intellisense is working now and my project compiled successfully, even though my customer is not that happy yet because he is still waiting…
Through my research on the web after solving this problem, I found that there is many (little though) variations for this polymorphic problem, like for Entity-Framework, you must add reference for (System.Data.Entity) to solve similar issues.
I hope this helps someone out there, eagerly trying to find a solution for this problem.
Happy programming every body.