When developing WPF, we often encounter a XAML file that shows a parsing error during design (for example, vs or blend) and the compilation works normally.
The reason is that the debug version of XAML must be anycpu. Solution: 1. open the project file XXX. csproj, 2. find the propertygroup Node 3 that contains <configuration condition = "& apos; $ (configuration) & apos ;=& apos; & apos;"> debug </configuration>. change <platform condition = "& apos ;$ (Platform) & apos ;=& apos; & apos;"> to anycpu in this propertygroup node. Example: <? XML version = "1.0" encoding = "UTF-8"?>
<Project toolsversion = "4.0" defaulttargets = "build" xmlns = "http://schemas.microsoft.com/developer/msbuild/2003">
<Propertygroup>
<Configuration condition = "& apos; $ (configuration) & apos ;=& apos; & apos;"> debug </configuration>
<Platform condition = "& apos; $ (Platform) & apos ;=& apos; & apos;"> anycpu </platform>