开发者

VS2010 Reference Resolves in Windows Application but not in Class Library

开发者 https://www.devze.com 2023-01-22 22:34 出处:网络
I have a class library project that references another class library.The project fails to build and I get the error \'The type or namespace name \'ReportLibrary\' does not exist in the namespace \'MSF

I have a class library project that references another class library. The project fails to build and I get the error 'The type or namespace name 'ReportLibrary' does not exist in the namespace 'MSF' (are you missing an assembly reference?)'

The weird part is that I have other projects referencing the same class library that build fine. The only difference is that they are Windows Application projects. If I change the pr开发者_C百科oject type to a Windows Application and add a Program.cs with a [STAThread] and it builds.

So WTF? Anybody know what I'm doing wrong?

Edit (More Details): All projects in the solution are set to the same Target Framework: .NET Framework 3.5

EDIT (Unobfuscated the error message per Hans)


Is the class library (with the error) targeting the Client Profile, and the applications (as well as the reference library) targeting the full framework? If so, this could cause the reference to be invalid, and cause that message.

0

精彩评论

暂无评论...
验证码 换一张
取 消