locked
"XAML parsing failed" exception in XAML RRS feed

  • Question

  • Hi,

        After Migrating my windows store app - VS2012, Windows 8 to VS2013, Windows 8.1

    I get following errors on all of my xaml file which used to work fine without any problems in vs2012

    "XAML parsing failed" exception in XAML

    but, when I tried to add some extra spaces in my XAML then continue executing my project it works fine, and i need to do the same for all pages which is annoying.

    sometimes I also get the below error during my build

    "Failure Generating XAML Binary Format Exception={0} visual studio 2013"

    and after multiple build try it is working fine..

    It's really very hard to find where its going wrong.

    Note: my file name doesn't have dot

    could you please help me how to fix this issues?

    its really a blocking issue for me right now so I would appreciate if there is any quick answer

    Many thanks in advance.

    kind regards,

    Snegha

    Friday, July 5, 2013 9:40 PM

Answers

  • @Snegha - thanks for this report.  We have logged a bug to look in to what is failing for XBF generation in your sample app.

    In the meantime, please use this property in your .csproj file to get around this issue:

    <DisableXbfGeneration>True</DisableXbfGeneration>

    This can be put in the first PropertyGroup within your csproj file

    Tim Heuer | Program Manager, XAML | http://timheuer.com/blog | @timheuer

    (if my post has answered your question, please consider using the 'mark as answer' feature in the forums to help others)

    • Marked as answer by snegha Wednesday, July 10, 2013 9:53 AM
    Monday, July 8, 2013 4:46 PM

All replies

  • Hi Snegha,

    Can you please provide more information about the files that are failing? I cannot figure out how to reproduce the problem. What exactly to you mean by adding extra spaces? Are you migrating your app to Windows 8.1 or still building it as a Windows 8 app?

    Can you reproduce this in a minimal sample that you can share on your SkyDrive?

    --Rob

    Friday, July 5, 2013 11:30 PM
    Moderator
  • Hi Rob,

    I've migrated my windows 8(vs2012) solution  to windows 8.1 (vs2013).

      When I execute my application I get run time error raised on all XAML pages on this particular line "this.InitializeComponent();" sometimes it works fine only when i add any new control or remove/add any space in my design XAML.

    I'm providing you the sample application sky drive link which also returning the same error, I tried to create a new VS2013 store app and add the existing file to it.

    https://skydrive.live.com/redir?resid=179B50DE5F02F4EF!227&authkey=!AJQ2Ovtm8ah2e-k

    kind regards,

    Snegha

    Saturday, July 6, 2013 6:42 AM
  • @Snegha - thanks for this report.  We have logged a bug to look in to what is failing for XBF generation in your sample app.

    In the meantime, please use this property in your .csproj file to get around this issue:

    <DisableXbfGeneration>True</DisableXbfGeneration>

    This can be put in the first PropertyGroup within your csproj file

    Tim Heuer | Program Manager, XAML | http://timheuer.com/blog | @timheuer

    (if my post has answered your question, please consider using the 'mark as answer' feature in the forums to help others)

    • Marked as answer by snegha Wednesday, July 10, 2013 9:53 AM
    Monday, July 8, 2013 4:46 PM
  • @Sengha - The issue is some malformed XAML in your code.  There is a log of

    <Grid Grid.Column=" 1" />

    Notice the extra space before the "1" character.  We're looking to fix this, but fixing to 'correct' XAML should be okay.

    Tim Heuer | Program Manager, XAML | http://timheuer.com/blog | @timheuer

    (if my post has answered your question, please consider using the 'mark as answer' feature in the forums to help others)

    • Proposed as answer by Tim HeuerMicrosoft employee Monday, July 8, 2013 6:49 PM
    • Marked as answer by snegha Wednesday, July 10, 2013 9:53 AM
    • Unmarked as answer by snegha Wednesday, July 10, 2013 10:33 AM
    Monday, July 8, 2013 6:49 PM
  • Hi Tim,

            Thanks for your post and it really helped me to resolve my issue.

    kind regards,

    Snegha

     

    Wednesday, July 10, 2013 9:54 AM
  • Hi Tim,

       "Failure Generating XAML Binary Format Exception={0} visual studio 2013" problem was resolved but

    "this.InitializeComponent();" was not resolved yet, and infact I double checked the below piece of line what you have mentioned and fixed by removing spaces. even then I get XAML parse exception error

    <Grid Grid.Column=" 1" /> 

    Thanks for your time

    kind regards,

    Snegha

    Wednesday, July 10, 2013 10:36 AM