Unhandled error on load xml.

Hi! I have an error when tried to load serialized xml file from pipeline. I haven’t any error when compile, but when I tried run on device it’s just crash.
On debug panel I have something like this

    'Holo.exe' (CoreCLR: DefaultDomain): Loaded 'C:\windows\system32\mscorlib.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Holo.exe' (CoreCLR: .): Loaded 'C:\data\ProgramData\Microsoft\Windows\AppRepository\Packages\50e5fe62-d74e-4fbc-bbb7-3a2f42ed282e_1.0.0.0_neutral__xwssnfc784h72\NI\Holo.ni.EXE'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Holo.exe' (CoreCLR: .): Loaded 'C:\windows\system32\WinMetadata\Windows.winmd'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Holo.exe' (CoreCLR: .): Loaded 'C:\data\ProgramData\Microsoft\Windows\AppRepository\Packages\50e5fe62-d74e-4fbc-bbb7-3a2f42ed282e_1.0.0.0_neutral__xwssnfc784h72\NI\MonoGame.Framework.ni.DLL'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Holo.exe' (CoreCLR: .): Loaded 'C:\windows\system32\SYSTEM.RUNTIME.NI.DLL'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Holo.exe' (CoreCLR: .): Loaded 'C:\windows\system32\SYSTEM.NI.DLL'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Holo.exe' (CoreCLR: .): Loaded 'C:\windows\system32\System.Runtime.WindowsRuntime.NI.DLL'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Holo.exe' (CoreCLR: .): Loaded 'C:\windows\system32\SYSTEM.COLLECTIONS.NI.DLL'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Holo.exe' (CoreCLR: .): Loaded 'C:\data\ProgramData\Microsoft\Windows\AppRepository\Packages\50e5fe62-d74e-4fbc-bbb7-3a2f42ed282e_1.0.0.0_neutral__xwssnfc784h72\NI\SharpDX.ni.DLL'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Holo.exe' (CoreCLR: .): Loaded 'C:\data\ProgramData\Microsoft\Windows\AppRepository\Packages\50e5fe62-d74e-4fbc-bbb7-3a2f42ed282e_1.0.0.0_neutral__xwssnfc784h72\NI\SharpDX.Direct3D11.ni.DLL'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Holo.exe' (CoreCLR: .): Loaded 'C:\data\ProgramData\Microsoft\Windows\AppRepository\Packages\50e5fe62-d74e-4fbc-bbb7-3a2f42ed282e_1.0.0.0_neutral__xwssnfc784h72\NI\SharpDX.Direct2D1.ni.DLL'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Holo.exe' (CoreCLR: .): Loaded 'C:\data\ProgramData\Microsoft\Windows\AppRepository\Packages\50e5fe62-d74e-4fbc-bbb7-3a2f42ed282e_1.0.0.0_neutral__xwssnfc784h72\NI\SharpDX.DXGI.ni.DLL'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Holo.exe' (CoreCLR: .): Loaded 'C:\data\ProgramData\Microsoft\Windows\AppRepository\Packages\50e5fe62-d74e-4fbc-bbb7-3a2f42ed282e_1.0.0.0_neutral__xwssnfc784h72\NI\UISerializableClass.ni.DLL'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Holo.exe' (CoreCLR: .): Loaded 'C:\windows\system32\en-US\mscorlib.debug.resources.dll'. Module was built without symbols.
'Holo.exe' (CoreCLR: .): Loaded 'C:\windows\system32\SYSTEM.IO.NI.DLL'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Holo.exe' (CoreCLR: .): Loaded 'C:\windows\system32\SYSTEM.CORE.NI.DLL'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The program '[5180] Holo.exe' has exited with code -1073741189 (0xc000027b).
Activation of the Windows Store app '50e5fe62-d74e-4fbc-bbb7-3a2f42ed282e_xwssnfc784h72!App' failed with error 'Windows was unable to communicate with the target application.  This usually indicates that the target application's process aborted. More information may be available in the Debug pane of the Output window (Debug->Windows->Output)'.

My xml file

<?xml version="1.0" encoding="utf-8"?>
<XnaContent xmlns:ns="Microsoft.Xna.Framework">
  <Asset Type="UiSerialize[]">
      <Item Type="UiSerialize">
          <Type>Button</Type>
          <Name>PlayButton</Name>
          <X>0</X>
          <Y>0</Y>
          <W>190</W>
          <H>49</H>
      </Item>
  </Asset>
</XnaContent>

And my serialize class

public class UiSerialize
{
    public String Type;
    public String Name;
    public int X;
    public int Y;
    public int W;
    public int H;
}

I don’t know how to fix this but XML is super slow, try to figure out binarywriter/binaryreader and there is HUGE performance upgrades.

Something I’ve noticed when loading content from the pipeline is that not every platform will print the exception to the console when it’s unhandled. Add a Try-Catch block around the content loading code and print out the exception that’s thrown. That’ll give you an idea of what the problem is.

How did you generate that XML? My XNA/MG XML-fu is a little rusty, but I don’t think you specify a Type for the Item, and I think you’re supposed to include the namespace for the Asset Type. So something like this:

<XnaContent>
<Asset Type="MyNamespace.UISerialize[]">
    <Item>
        <Type>Button</Type>
    </Item>
</Asset>
</XnaContent>

Thank you. Please can you answer one more question? Is Json.NET work with monogame?

I created thisXML file by hand. I know it’s not furhter best version, but I will take into account.

Thank you, I found error, I tried cast object to array. But now I have another question, how to read array from content pipeline?

I don’t see why it wouldn’t, but I also have no clue what it is.

I know Json.Net works. That’s what I use, instead of XML. I’m out and about right now, but when I get home I can help with your XML questions.

Thank you, but If found expection. I tried cast object into array.