0

i am working on a Universal Windows Platform (UWP 10) C# application where i try to implement an AIML chatBot , but i find problems with this exception :

An exception of type 'System.TypeLoadException' occurred in AIMLbot.dll but was not handled in user code

Additional information: Could not load type 'System.Xml.XmlDocument' from assembly 'System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'.

is there any thing i can do, i was thinking about changing the Default.rd.xml !

Said Bouigherdaine
  • 637
  • 1
  • 8
  • 22
  • See also https://stackoverflow.com/questions/5321484/a-net-exception-typeloadexception-occured-in-the-module, https://stackoverflow.com/questions/3094571/what-kind-of-problem-can-cause-a-typeloadexception, etc. If you want help debugging, you need to provide a good [mcve] that reliably reproduces the problem. Without one, all anyone can do is offer general advice, and we have topics on Stack Overflow already that provide that. – Peter Duniho Jul 11 '16 at 01:19

1 Answers1

0

As you can see from the exception message, AIMLbot.dll is unable to load System.Xml.

An exception of type 'System.TypeLoadException' occurred in AIMLbot.dll but was not handled in user code

Additional information: Could not load type 'System.Xml.XmlDocument' from assembly 'System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'.

You need to verify if your target framework for AIMLbot.dll can support System.Xml Version 2.0.5.0. You might have downgraded the target framework or if you are loading the assembly through

Assembly xmlAssembly = Assembly.Load("System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e");

You need to check the version.

jegtugado
  • 5,081
  • 1
  • 12
  • 35
  • Have the same issue here https://stackoverflow.com/questions/53649224/xamarin-forms-system-typeloadexception-clean-remove-bin-and-obj-folders-and Can you please check – Sreejith Sree Dec 08 '18 at 11:20