Marco Vasapollo
Marco Vasapollo

Reputation: 519

Code Sharing between Windows Phone 7 and Windows Phone 8 / Windows 8 (Windows Store)

I have a Silverlight 4 class library written in C# that I use as common code for my Windows Phone 7 projects.

What I want is to use this (basic, platform-independent) code in my Windows Phone 8 and Windows 8 Apps too.

Is there any way?

It's not strong-necessary that the common code has to be stored in a Silverlight 4 (v5 seems not supported by WP7) project.

Upvotes: 2

Views: 297

Answers (1)

Marc Gravell
Marc Gravell

Reputation: 1062770

Set the common code up as a "portable class library" project, targeting the platforms you want (Silverlight and Windows Store in this case). This gives you access to the intersection of those frameworks. This can then be referenced and used by the framework-specific shell projects.

Upvotes: 5

Related Questions