diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/MS/Internal/MarkupCompiler/MarkupCompiler.cs b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/MS/Internal/MarkupCompiler/MarkupCompiler.cs index 82265660bff..cc1e760f39b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/MS/Internal/MarkupCompiler/MarkupCompiler.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/MS/Internal/MarkupCompiler/MarkupCompiler.cs @@ -225,8 +225,7 @@ public void Compile(CompilationUnit cu) { // Don't rely on next compilation to reset as that would unnecessarily delay // garbage collection of this static data that cannot be reused by the next compilation. - // Also, the ReflectionHelper must be disposed now to release file locks on assemblies. - XamlTypeMapper.Clear(); + // Also, the ReflectionHelper must be disposed now to release file locks on assemblies KnownTypes.Clear(); ReflectionHelper.Dispose(); }