Search code examples
c#windows-phone-8.1visual-studio-2015windows-8.1-universal

Add Windows 8.1 project to Solution with Windows Phone 8.1 project


I have Windows Phone 8.0 (Silverlight) app that is retargeted to 8.1. I'm using Visual Studio 2015 Community if it matters.

Question

Is it possible to add Windows 8.1 app and Shared Project to solution?

Goal

I want to have a situation like when I've created universal windows's app and I can choose what app is building now, share some classes etc.

Update

So I've done like Igor told me. Now I have Windows 8.1 project and PCL in same solution. PCL is added as reference to both projects. But one thing is still missing.

Now my window look like this.

enter image description here enter image description here

And I want to have this.

enter image description here

Solution I had to create PCL and do like Igor told me to do :)


Solution

  • Not really, shared project would make no sense because your phone app is Silverlight not WinRT so you would not be able to share much code.

    Just create a Portable Class Library (PCL) targeting Windows 8.1 and Windows Phone 8.1 Silverlight and add as much code there as possible.