In . NET, XmlSerializers. dll is for serializing/deserializing the . NET classes. Its more for performance boost.
XML Serializer Generator Tool. This creates an xml serialization assembly for types in a specified assembly in order to improve the startup performance of a xmlserializer when it serializes or deserializes objects of the specified types. These assemblies can then be deployed with your application.
In .NET implementation, the XmlSerializer generates a temporary assembly for serializing/deserializing your classes (for performance reasons). It can either be generated on the fly (but it takes time on every execution), or it can be pregenerated during compilation and saved in this assembly you are asking about.
You can change this behaviour in project options (tab Compile -> Advanced Compile Options -> Generate serialization assemblies, Auto or On, respectively). The corresponding element in the project file is GenerateSerializationAssemblies, for example, <GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
.
FYI. The exact steps to stop the XmlSerializers.dll from being auto-generated are:
I think this is the JIT (Just in time) compilation of XML serialisers for performance reasons.
You get the same thing with RegEx instances using the RegexOptions.Compiled option turned on.
I'm no .NET CLR expert, sorry for lack of precise technical detail.
*.XmlSerializers.dll
are generated using the Sgen.exe [XML Serializer Generator Tool]
See Sgen.exe on MSDN
Typically the Sgen.exe
is used in Post Build events of Projects. See if your project has a post build event which generates the *.XmlSerializers.dll
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With