Type or Namespace can't be found when it truly exists

Hi,

I have a problem with using a dll reference that exists, but can't be referenced in code without an error 'The type or namespace name 'xxx' could not be found.'

If I create a new project, and include a dll reference (the db4o dll actually) in my project. I can then include it typing 'using com.db4o;' and everything works.

However, I have an old C# project that has the same code but it referenced an older version of db4o.dll. So I deleted that reference and created a new one. I have confirmed it points to the new dll and I can browse the reference by double-clicking on it - and I can find this:

public class Db4o
Member of com.db4o

However, as soon as I type 'using com.' in my code, intellisense won't find it. and if I type 'using com.db4o;' and then use it elsewhere in code, I always get this error below when I try to build:

Error 14 The type or namespace name 'com' could not be found (are you missing a using directive or an assembly reference ) D:\Code\TestBlex.cs 6 7

I've tried deleting the contents of my \bin and \obj directories and rebuilding with no luck.
What else can I do to 'clear' C# Express's opinion that I don't have a reference to a dll when I actually, truly do





Answer this question

Type or Namespace can't be found when it truly exists

  • rcarring

    hi,

    i don't know if this gonna solve the problem or not , but once something like this happend to me and the problem was in my project default namespace

    right click your project and select properties and see what's your default name space in application tab, then using defaultNamespace.YourDllNamespace

    and see if this will work

    hope this helps



  • Type or Namespace can't be found when it truly exists