简体   繁体   中英

WPF/C# can't find valid assembly reference

I've downloaded an open source third-party assembly for use in my WPF/.NET 4/VS2010 project. I've added a reference to the project's DLL and verified that VS2010 can see it by walking through the exposed classes in the object browser. When I add a "using" directive to the appropriate class in my project, Intellisense offers the new assembly as a suggestion, so VS2010 is aware of it at some level. Intellisense also generates tips for the exposed classes that I'm trying to use. Unfortunately, my project fails to compile because of a missing assembly reference for this assembly. The classes are highlighted as valid, Intellisense lets me navigate to the methods, etc, but the compiler won't acknowledge them. In case it was a C# version mismatch, I recompiled the open source project, targeting .NET 4. This didn't change a thing.

What am I missing? This seems like simple developer error, but I'm not sure how to proceed.

This sometimes happens when the library itself depends on other libraries. When your library contains multiple DLL's, reference all the DLL's of that library in your project.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM