简体   繁体   中英

How to reference compact framework 3.9 class library in the full framework 3.5 class library

I have a class library that targets .NET Compact framework 3.9 and I have the class library that targets .NET Framework 3.5. Now, when I'm adding a reference to .NET CF 3.9 library in .NET 3.5 library all the types from CF library are not resolved and I cant use them. Is there a way to make it to work?

Unfortunately, no. Your only "solution" is to create two separate projects, one for the full framework and one for the CF. If you put the project files in the same folder and manually edit the project files to include *.cs, you can at least have them always contain the same source files, but there's no binary compatibility or way to get the CF assembly to load in the full framework.

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