C# Annoyance
I'm blogging this for my own damn good, since I never seem to remember the solution. I've frequently had an error recently when referencing projects in C# stating something along the lines of:
The type or namespace name 'namespace' does not exist in the namespace 'other_namespace' (are you missing an assembly reference?)
And you know what? It's infuriating.
Turns out, the solution is similarly infuriating: check the target platform. The class libraries are, of course, built in '.NET 4', however the application referencing them is set to '.NET 4 Client Platform'. Why? Who knows. But if you change it to plain old '.NET 4' it fixes it.
Job done.
Labels: .NET, assembly, C#, does, exist, missing, name, namespace, not, or, reference, type

0 Comments:
Post a Comment
<< Home