I was working on a resw file to enter my uwp app strings but after I finished the resw file when i wanted to build app it shows me the error that listed above :
C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v14.0\8.2\Microsoft.Windows.UI.Xaml.Common.targets(264,5): Xaml Internal Error error WMC9999: Data at the root level is invalid. Line 1, position 1.
after I excluded the file but it still shows this error ! What is this error & why i get this ?
This issue can be replicated referencing C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Xaml.dll
I've had the same problem, I don't know if my solution is applicable for all situations:
Look for System.Xaml.dll
in you references and remove it
This reference was added by
VS
without reason (I think)
Clean, rebuild and run
your project.
If you get this error:
CSC : error CS5001
Just follow this tutorial by Marius Bancila
I noticed the same "WMC9999" error reported in the output window: "C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v14.0\8.2\Microsoft.Windows.UI.Xaml.Common.targets(264,5): Xaml Internal Error error WMC9999: Index (zero based) must be greater than or equal to zero and less than the size of the argument list."
It turned out to be a silly copy-and-paste mistake in the XAML. Notably, instead of being:
<Page x:Class="MyAppNamespace" ...
it was:
<Page x:Class="namespace MyAppNamespace" ...
(I just pasted the "namespace" keyword in the x:Class attribute's value, followed by a space). To solve the problem, just ensure that your XAML is correct!
Hope this can help...
If you're developing UWP and meet this error, it can be a mistake of referencing System.Windows.Form (somehow by automatically correcting Alt-Enter is root-evil). Remove this from your references list and build your solution again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With