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.20.2011
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
Subscribe to:
Post Comments (Atom)
Thanks very much Scott! Saved my lots of time..
ReplyDeleteThank you - you've just stopped me from throwing my laptop out of the window in frustration! ;)
ReplyDeleteThat just saved me hours of frustration. Thanks!
ReplyDeleteJeremy
Thank you just saved my life as well
ReplyDeleteThank you. It helped me alot. -- Roopesh
ReplyDeleteCheers, you Saved my time.
ReplyDelete