Building a PCL for Windows 8 in Visual Studio 2013 XAML not compiling RRS feed

  • Question

  • So here is my issue.

    Right now I'm building a PCL for both Windows 8 and Windows Phone 8. The laptop I'm using only has VS 2013 Pro on it, so I've had to resort to tricks like using my home PC with VS 2012 to create a couple projects like the Windows Phone 8 ones.

    I have a common PCL project, lets call it mainLibrary, that is then referenced by the 2 platform specific projects mainLibrary.Phone and mainLibrary.Windows.

    Each project has some platform specific code, and within them there is also a UserControl, specific for each project. The Windows Phone 8 project compiles fine, gives me 2 neat dlls for me to distribute to the rest of the team, the Windows 8 however, insists on having the XAML exported instead of compiled.

    I tried creating a Windows 8.1 UserControl test project, and it compiles into a neat dll, but whenever I change it into a Windows 8.0 (by manually changing the TargetPlatformVersion tag in the csproj file) the behaviour is the same, by exporting the xaml file next to the dll, and without it the client app will always crash on InitializeComponent.

    Is it a side effect of me having changed the version in a "bad way"? Is there a way to work around it?

    • Edited by Nuno Quintas Monday, August 11, 2014 3:36 PM Clarity
    Monday, August 11, 2014 2:33 PM

All replies

  • Hi,

    I suggest to go with Shared library as there is scope to share UI and other classes. For this you may need, VS 2013 update 3 RC.

    For more information, check this


    Monday, August 11, 2014 6:04 PM
  • Thank you for your reply.

    That was my first idea, but im bound by the Windows 8 and Windows Phone 8 requirement. For 8.1 it would be a lot easier. In any case, i have a shared control for both Windows and Phone projects and the Windows Phone compiles the dll just fine but the Windows never compiles the xaml and puts it as external file. The project is suposed to be locked for the rest if the company so having a Xaml file open for edit is a big issue.

    Funny enough, just upgrading the project for windows 8.1 compiles also the xaml page into the dll so i'm guessing this is a windows 8 limitation?

    Monday, August 11, 2014 8:07 PM