MCG0030 ProgramAnalysis Error reading XR.XML document


  • Windows 10 Pro, VS15, all is recent and updated. Building UWP app, running locally - all ok.

    Trying to publish to Windows Store, Create Packages fails at build stage with messages:

    C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\x86\ilc\IlcInternals.targets(791,7): error : MCG0030: MCG0030:ProgramAnalysis Error reading XR.XML document 'PortableLibraryName.xr.xml': Unexpected or missing node 'Roots'.__

    and following error message is:

    error MSB3073: The command ""C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\x86\ilc\ilc.exe" ... /targetframeworkpath:"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319" /RdXmlPath:"C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\LibraryXML" /suppressPDBWarnings:true /AllowNoManagedCode /UseCustomFramework "/logger:CsvLogger;1556;1792"" exited with code 1201

    Happens when we turn on .NET Native, when we turn it off all builds, but store rejects package.

    Any help is appreciated.


    Saturday, August 1, 2015 1:16 PM

All replies

  • I'm experiencing the exact same problem.
    Monday, August 3, 2015 6:32 PM
  • Hi Clemens,

    Are you experiencing this with xamlmapcontrol? (I am...)

    Wednesday, August 5, 2015 4:36 AM
  • Hi Jay,

    you're right, it's with XAML Map Control.

    Upcoming version 2.5 will have a Universal App sample application, which should compile with .NET Native. It runs with the MapControl.WinRT library, but the native build fails. I've then added a MapControl.UWP library that uses the same source files as MapControl.WinRT, but targets Universal Windows. With this library the native build succeeds.

    I'm going to release it soon.

    • Edited by ClemensF Saturday, August 8, 2015 12:19 PM
    Saturday, August 8, 2015 11:39 AM
  • Comparing the .xr.xml files generated for a Portable Class Library and a Universal Windows Class Library, I realized that Visual Studio 2015 (not 2013) generates a XML namespace at the <Roots> element:

    <Roots xmlns="clr-namespace:Microsoft.Xaml.Tools.XamlCompiler.RootLog;assembly=Microsoft.Windows.UI.Xaml.81.Build.Tasks">

    The namespace declaration apparently breaks the .NET Native build of a Universal Windows App that references the PCL. After removing it, the build succeeds.

    • Edited by ClemensF Tuesday, August 11, 2015 10:40 AM
    Sunday, August 9, 2015 1:22 PM
  • I've reported this problem on Connect, feel free to vote for a fix:

    Monday, August 24, 2015 1:34 PM
  • @ClemensF - how did you edit there xr.xml files. When I edit them, and recompile, they are just override with new copy. Of cource I don't have any problems when I compile in Debug, without .NET Native.

    I have Window 8.1 with several PCL projects as references. Now I migrated main app project to Windows 10 (UDP) but PCL projects are no touched. What can I doo to fix it?

    I don't want to migrate my PCL projects to Windows 10 UWP, because I have still share them to my old 8.1 projects.


    Monday, October 19, 2015 5:00 PM