locked
Error on generated code in metro Portable Class Library

    Question

  • Hi,

    I create a Portable class library for C# metro application. But I am stuck cause of a UserControl auto generate code.

    In my code I create a new UserControl, I check on windows.current.content if I find a grid, I pick the grid and in grid.Children I add my UserControl.

    It work fine when I do this in a C# metro app where I link my class library. But my goal is to use it under a nuget package. And when I do, I caught a xaml parse error when UserControl try to initialyze itself from visual studio 2012 auto generated code.
    Windows.UI.Xaml.Markup.XamlParseException occurred
      HResult=-2144665590
      Message=XAML parsing failed.
      InnerException: 
    Did I have a way to avoid this error? Can I pre build my code and when I integrate it with nuget just made a new build  to have correct generated code?
    Friday, February 28, 2014 1:25 PM

All replies

  • Hi,

    I have moved this thread to Building Windows Store apps with C# or VB forum for better support.

    Thanks,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, March 03, 2014 4:58 AM
  • Hi, harckline

    Your problem is main about nuget package. I recommend you should go to the forum about

    nuget to post your thread. And also there a link about how to how to Packaging a Windows

    Store apps component with Nuget you can refer to, may be that can help you:

    http://blogs.msdn.com/b/mim/archive/2013/09/02/packaging-a-windows-store-apps-component-with-nuget-part-2.aspx

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    Monday, March 03, 2014 9:48 AM
  • Hi,

    Since this morning I have try to solve this, regarding this issue I found this : http://social.msdn.microsoft.com/Forums/windowsapps/en-US/fa2d8d53-254c-4d4a-b39a-110fde0d6c80/dot-in-the-projects-name-cause-xamlparseexception?forum=winappswithcsharp

    But I cannot change all assemblies in my project. So I have try to add a project in the solution and set his namespace without dot and reference it. But it still not work. I don't know why but visual studio allready added the referenced project to the application project which is build with dot namespace.

    Did we can tell visual studio that the project have to be build in two time and reference the side project with namespace without dot?

    PS: Windows seems to provide a hot fix http://support.microsoft.com/kb/2739194/en but I have to do it manually?

    Monday, March 03, 2014 2:30 PM
  • Hi there, 

    To get the hotfix, try creating a technical ticket via portal: https://getsupport.microsoft.com/default.aspx?ccsid=635119334012958595&scrx=1 

    Regards,

    jenny 

    Monday, May 19, 2014 8:11 AM