简体   繁体   中英

Can Windows Runtime Component reference Portable Class Library?

I'd like to create simple Portable Class Library targeting WP8 and Windows 8, and use it both in Windows Phone 8 Background Agent and Windows 8 Periodic Task. Is it possible, will it work?

From what I know Windows 8 Windows Runtime Components have some strict limitations that all public classes must be sealed, we should not return the Task object, only IAsyncAction, etc, so I'm not sure it's allowed to reference and use PCLs that has no such limitations.
Thanks

While creating the Portable Class Library, just select the appropriate targets (as in W8, WP8, Silverlight etc.) and then reference them in your projects. Only the assemblies which are common to the target platforms will be available in the PCL and you can use them accordingly.

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