Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Xaml Parsing Failed" on Windows Store Apps User Control Project

I must be missing something simple/fundamental that I failed to reference a Windows Store Apps Class Library/Windows Runtime Component in my Windows Store Apps Project.

I stripped everything down to it's bare-bone state. This is what I've got:

The User Control Project (DummyItem.xaml):

<UserControl ...>
  <Grid Background="Red">

  </Grid>
</UserControl>

My Windows Store Apps' MainPage.xaml:

<Page ...
  xmlns:c="using:Midas.UI.Cards">

  <Canvas Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
      <c:DummyItem Width="150" Height="100"></c:DummyItem>
  </Canvas>
</Page>

I am able to build the project, but upon running it says "XAML Parsing Failed". I am not able to preview the control on the MainPage.xaml's designer, it says "Can't create an instance of DummyItem".

I've been experiencing this problem since Visual Studio 11 RC, and had to release my apps with all the user controls' code replicated in the Windows Store Apps project itself for it to work. Can any kind soul point me at the correct direction? Thanks!

like image 617
VT Chiew Avatar asked Oct 28 '12 16:10

VT Chiew


1 Answers

It´s a known issue in Visual Studio 2012. The problem appears, if the assembly´s name contains a dot. See: http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/fa2d8d53-254c-4d4a-b39a-110fde0d6c80

like image 84
Matze Avatar answered Oct 05 '22 02:10

Matze