sgen.exe, XmlSerializers.dll not being used
问题 I need to produce XML serializers for certain of my classes in advance to avoid them being built when the application runs. I managed to (eventually) get sgen running as a post build operation. It appears to be working as it produces the expected DLL. However its not being used. I have configured the diagnostics to leave the files on disk and I can see them still being produced. This is with an existing class (ClassA) of moderate complexity. So I created a simple class (ClassB) and tested on