简体   繁体   中英

Share project between Windows Store Application And WCF Service

Is it possible to create and "share" a class library project between an Windows Store Application and WCF Service project ?

I created Windows Store Application project and WCF Service project. Now, both projects should refer a Class library project.

If I create a regular Class Library project, the WCF Service project can refer it. But when I add the reference to the Windows Store Application Visual Studio 2012 says :

Unable to add the reference to project XXX

So I decided to replace the regular Class Library project by a Class Library(Windows Store apps). Now the Windows app project can refer the Class Library(Windows Store apps). But when I add the reference to the WCF Service Visual Studio says :

Unable to add the reference to project XXX

To share code between the two projects create a Portable Class Library (PCL) project and reference it in the two projects.

Make sure you choose the right .Net framework (for compatibility with WCF 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