Windows 8 & Windows Phone 8 Windows 8 & Windows Phone 8 windows windows

Windows 8 & Windows Phone 8


Some thoughts on how to get high code reuse:

  • Currently XAML may be your best language choice...lots of overlap between Win8 and WP8. Here is a XAML controls comparison between Windows Phone 8 and Windows 8.
  • Leverage the MVVM pattern. This gives a nice decoupling of your UI and application logic.
  • Use portable class libraries (DLLs that can be used across Win8, WP8, and other platforms). More info here.
  • Or, use "Add as link" to reference the same source file from both Win8 and WP8. That way, you are maintaining the source code in one place, but it is used by both your Win8 and WP8 apps.
  • Use conditional compilation. This will enable you to compile certain chunks of code in only for Windows 8, for example. It's nice to use sparingly, but if you find yourself using this technique often, your code can get very difficult to read and for others to maintain.
  • This video on How to Leverage your Code across WP8 and Windows 8 from BUILD 2012 is helpful.
  • There are lots of useful links on http://aka.ms/ShareCode and Getting started developing apps for Windows Phone 8 and Windows 8.
  • SIDE NOTE: it's nice that you have Visual Studio Professional if you're developing for both. You can develop for both using the free versions (Visual Studio Express for Windows 8 and Visual Studio Express for Windows Phone, both available for download here), but with Professional, you can have one instance of Visual Studio open and reference both types of projects in the same solution.


Yes, but you need to use diffrent project templates.You also need Windows 8 SDK and Windows Phone 8 SDK.

If you use XAML, you can easily migrate in projects (without phone features and contracts).