Why did I get an error with my XmlSerializer?

前端 未结 5 832
粉色の甜心
粉色の甜心 2020-12-23 13:39

I made a couple of changes to my working application and started getting the following error at this line of code.

Dim Deserializer As New Serialization.XmlS         


        
5条回答
  •  醉梦人生
    2020-12-23 14:31

    How did you load the assembly containing the Groups type? I'm guessing you loaded it with Assembly.LoadFrom() because the XML serializer is using the same context (the 'LoadFrom' context) to attempt to load assemblies for serialization. If so, you have a couple of options:

    1. Use Assembly.Load() instead of Assembly.LoadFrom().
    2. Attach a handler to AppDomain.AssemblyResolve to help the CLR find the assembly in question.

提交回复
热议问题