Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The type or namespace 'MyNamespace' does not exist etc

I have the usual type or namespace name does not exist error, except that I have referenced the assembly, the using statement does not show as incorrect and the classes I am referencing are public. In fact, I reference and using the same assembly in a different solution to do the same thing and it works fine.

This is VS2010 by the way.

Any ideas anyone?

Ed

like image 635
Ed Bishop Avatar asked Dec 29 '22 06:12

Ed Bishop


1 Answers

I have discovered the answer to this problem if anyone else is interested.

In my main application I target the .NET Framework 4 Client Profile, but in one of the referenced assemblies I target the full .net framework. Whilst the intellisense and Visual Studio itself don't report a problem, the compiler throws an error. Not an error relating to the target framework mind, just a "The type or namespace does not exist" error relating to my namespace rather than the one that is missing in the client profile version of the framework.

Ed

like image 177
jcady Avatar answered Jan 09 '23 06:01

jcady