Showing posts with label Missing Reference. Show all posts
Showing posts with label Missing Reference. Show all posts

Saturday, March 19, 2011

The type or namespace name 'xxxx' does not exist in the namespace 'yyyy' (are you missing an assembly reference?)

Problem:
Error    1          The type or namespace name 'xxxx' does not exist in the namespace 'yyyy' (are you missing an assembly reference?)
Screenshot:

My environment: Visual Studio 2010, .Net 4.0.   Two projects involved, 1 is a dll, other is a console app.

You know your reference is correct, but you still get that reference error.  Your using clause fails, too.
Screenshot:
 

Solution:
In this case, my console app had the Target Framework in the project properties set to .NET Framework 4 Client Profile, the dll project had it set to .NET Framework 4.  I changed the console app to use .NET Framework 4, and everything built fine.

Console App Project properties before:

Console App Project properties after: