Monday, January 7, 2013

The type or namespace cannot be found... C# and the Client Profile woes

So, this is a very funny and unusual error I bumped into today -- and it drove me mad for a few hours.

When I build components, I generally like to abstract them out into a little test-bed WPF application.  Every time I kept compiling, it would blow up on a simple, new component I had just added, with a message looking like...

"The type or namespace '{0}' cannot be found."

When I did try to resolve it -- it pointed out a flaw in our architecture, wherein some numb-skull decided to rename a namespace in one assembly to that of another.  After I fixed that, I found that it was STILL not the problem.

Then I looked again -- for whatever I could find -- in my test-bed's properties.

It was set to run in .NET 4.0 Client Profile.  When I changed it back to .NET 4.0, everything compiled and worked fine.

In the future, I need to double check these things -- hopefully someone else will read this post and later figure this out as well!

No comments:

Post a Comment