What is MyAssembly.XmlSerializers.dll generated for?
Solution 1:
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>
.
Solution 2:
FYI. The exact steps to stop the XmlSerializers.dll from being auto-generated are:
- In VS, right-click your project file and select "Properties"
- Click the "Build" tab
- Change the "Generate serialization assembly" dropdown from "Auto" to "Off"
- Rebuild and it will be gone