Martin Suchan
Martin Suchan

Reputation: 10620

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

Upvotes: 1

Views: 465

Answers (1)

Manvik
Manvik

Reputation: 977

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.

Upvotes: 1

Related Questions