diff --git a/ILSpy.BamlDecompiler.Tests/BamlTestRunner.cs b/ILSpy.BamlDecompiler.Tests/BamlTestRunner.cs index e5b5c06b7..7728ede9d 100644 --- a/ILSpy.BamlDecompiler.Tests/BamlTestRunner.cs +++ b/ILSpy.BamlDecompiler.Tests/BamlTestRunner.cs @@ -136,6 +136,12 @@ namespace ILSpy.BamlDecompiler.Tests RunTest("cases/issue1547"); } + [Test] + public void Issue2052() + { + RunTest("cases/issue2052"); + } + [Test] public void Issue2097() { diff --git a/ILSpy.BamlDecompiler.Tests/Cases/Issue2052.xaml b/ILSpy.BamlDecompiler.Tests/Cases/Issue2052.xaml new file mode 100644 index 000000000..fd72598d4 --- /dev/null +++ b/ILSpy.BamlDecompiler.Tests/Cases/Issue2052.xaml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj b/ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj index a07ce7492..85c0519e3 100644 --- a/ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj +++ b/ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj @@ -89,6 +89,9 @@ MSBuild:Compile + + MSBuild:Compile + MSBuild:Compile diff --git a/ILSpy.BamlDecompiler/Handlers/Records/PropertyHandler.cs b/ILSpy.BamlDecompiler/Handlers/Records/PropertyHandler.cs index 25494ab66..913712c4f 100644 --- a/ILSpy.BamlDecompiler/Handlers/Records/PropertyHandler.cs +++ b/ILSpy.BamlDecompiler/Handlers/Records/PropertyHandler.cs @@ -38,6 +38,7 @@ namespace ILSpy.BamlDecompiler.Handlers var elemType = parent.Xaml.Element.Annotation(); var xamlProp = ctx.ResolveProperty(record.AttributeId); var value = XamlUtils.Escape(record.Value); + xamlProp.DeclaringType.ResolveNamespace(parent.Xaml, ctx); parent.Xaml.Element.Add(ConstructXAttribute());