Visual Studio 2010 – The type or namespace name 'MyClassLibrary' could not be found
I have run across this message in the Beta Edition of Visual Studio 2010 , and I dismissed it as a Beta feature . But now with the release version , for me , that message was a bit out of place .
It seems that the solution , as far as I’m concern , is very simple , change the Target to “.NET Framework 4” and everything is going back to normal.
If you’ll look closely , you’d notice that the default is set to “.NET Framework 4 Client Profile”
The .NET Framework 4 Client Profile is a subset of the .NET Framework 4 that is optimized for client applications. It provides functionality for most client applications, including Windows Presentation Foundation (WPF), Windows Forms, Windows Communication Foundation (WCF), and ClickOnce features. This enables faster deployment and a smaller install package for applications that target the .NET Framework 4 Client Profile.
If you are targeting the .NET Framework 4 Client Profile, you cannot reference an assembly that is not in the .NET Framework 4 Client Profile. Instead you must target the .NET Framework 4. For more information, see Troubleshooting .NET Framework Targeting Errors.