I have an sgen step in my .NET 3.5 library that creates the correct XYZ.XmlSerializers.dll file in the output directory. Despite the poor serialization performance, I found that .NET still calls csc at runtime. Using the process monitor, I saw that .NET was looking for a DLL with the name "XYZ.XmlSerializers.-1378521009.dll".
Why is there "-1378521009" in the file name? How to tell .NET to use the "normal" DLL created by sgen?
Understanding a bit with Reflector, this happens when you use the XmlSerializer (Type, string) constructor, specifying your own namespace. Instead, try using the XmlSerializer (Type) constructor.