Application Can't Find References

For the past several hours I have been trying to understand why a C# console application would not build. I'm using Visual Studio 2010. I have several other console applications that are working properly. However, this one kept claiming that it could not find two custom assemblies that I had referenced. I was getting
The type or namespace name 'StructureMap' could not be found (are you missing a using directive or an assembly reference?)
Of course, I checked repeatedly that the assemblies were in fact referenced. I even went as far as deleting and recreating the project, all to no avail. I finally found a stackoverflow post that addressed the problem. Turns out my custom assemblies are compiled targeting the .NET 4 Framework. My console application was only targeting the .NET 4 Client Profile. This caused the console application to lose track of the custom assemblies. Extremely frustrating as the error message was not indicative of the problem. Glad it was an easy fix though.


  1. Thanks very much Scott! Saved my lots of time..

  2. Thank you - you've just stopped me from throwing my laptop out of the window in frustration! ;)

  3. That just saved me hours of frustration. Thanks!


  4. Thank you just saved my life as well

  5. Thank you. It helped me alot. -- Roopesh


Note: Only a member of this blog may post a comment.