System.Private.Xml contains all of the code for generating an assembly as the core logic behind the sgen tool:
https://github.com/dotnet/corefx/tree/master/src/Microsoft.XmlSerializer.Generator
The vast majority of the functionality here isn't used by anything other than sgen, which calls XmlSerializer.GenerateSerializer via reflection, and is the only caller of that method. This functionality should be removed from XmlSerializer in System.Private.Xml and moved into sgen.
System.Private.Xml contains all of the code for generating an assembly as the core logic behind the sgen tool:
https://github.com/dotnet/corefx/tree/master/src/Microsoft.XmlSerializer.Generator
The vast majority of the functionality here isn't used by anything other than sgen, which calls XmlSerializer.GenerateSerializer via reflection, and is the only caller of that method. This functionality should be removed from XmlSerializer in System.Private.Xml and moved into sgen.