When LINQ Intellisense Does Not Work

Problem:

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.

My Case:

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

Solution:

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…

Summary:

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.

Hello Development!

Who Am I?

My name is Kenan Fakheredeen (aka LordCover), a software developer with 7 years of experience in Microsoft technologies, I created this blog to share my knowledge with my tech-savvy mates around the world.

I’m trying to step up on the ladders of these technologies/frameworks:

  • ASP.NET
  • ASP.NET MVC
  • Design Patterns (mainly Repository).
  • Test-Driven Development/Mocking/Dependency Injection.
  • The evil Javascript, jQuery, Function Closures.
  • N-Tier Architecture and Loosely Coupled Layers.
  • Modular Application Design (ERP Systems).
  • Generics/LINQ/Lambda Expressions.
  • ORMs (LINQ-to-SQL, Entity-Framework).

I’m from Syria, resident in UAE, Dubai and trying my best to save the world with the software I develop.

What will this blog contain?

  • Solutions to some subtle technical/programming problems.
  • Briefs about the projects I am working on.

I welcome each and every comment about any improvement to the blog or any flaws within my (buggy?) code.

P.S: You may follow this blog (at your own risk!)

Follow

Get every new post delivered to your Inbox.