XmlSerializer not using XmlSerializers.dll created by sgen

后端 未结 3 881
北海茫月
北海茫月 2021-01-18 06:23

In my Visual Studio 2010 project, I use following Post-Build event command line to use sgen to create XmlSerializers.dll.

Post build event:

\"$(Pro         


        
3条回答
  •  北海茫月
    2021-01-18 06:52

    Are you sure that the serialization assembly is correctly signed? Usually you need to escape the quotes. See here for more information.

    You could also check if the IDs match. If you modify the source assembly after building the serialization assembly the IDs don't match any more and the serialization assembly won't be used. See here for more information.

    If all that is correct: Disable Tools -> Options -> Debugging -> "Enable Just My Code" and enable Debug -> Excpetions -> Common Language Runtime Exceptions -> Thrown. Then debug your application to the point where the serialization is done. An first chance exception will be thrown stating why the serialization assembly can't be used.

提交回复
热议问题