.net core XamlWriter written System.Boolean objects are incompatible with .net4x XamlReader
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
* .NET Core Version: 3.1.300
* Windows version: Win10 Build 18363.836
* Does the bug reproduce also in WPF for .NET Framework 4.8?: No
* Is this bug related specifically to tooling in Visual Studio (e.g. XAML Designer, Code editing, etc...)? No
**Problem description:**
The `System.Windows.Markup.XamlWriter` differs in its output for System classes from the output of the XamlWriter in .net4x.
E.g. booleans that were written in namespace/assembly
`clr-namespace:System;assembly=mscorlib`
are read correctly by the `XamlReader`, but when written again they end up as
`clr-namespace:System;assembly=System.Private.CoreLib`
The result can no longer be read by the .net4x XamlReader.
**Expected behavior:**
I would expect the output of classes in the System namespace to be compatible with the .net4.x reader. (Especially since the xaml can be read correctly given the old namespace)
Incompatible output for such basic elements makes it harder to write generators that creates xaml compatible with both .net core and .net4x
**Minimal repro:**
Simple project that demonstrates the change in namespace:
[XamlWriterNamespaceTest.zip](https://github.com/dotnet/wpf/files/4702717/XamlWriterNamespaceTest.zip)
Contributor guide
Assessment
This issue has not been assessed yet.