Link to home
Start Free TrialLog in
Avatar of gswitz
gswitz

asked on

XmlSerializer(this.GetType());

I've shot myself in the foot...

I've been cleaning up a project and I've made a few changes...

I'm trying to run a test and I call...

XmlSerializer Serializer = new XmlSerializer(this.GetType());

and I get...
System.InvalidOperationException was unhandled
  Message=There was an error reflecting type 'MyProjects.MyProject.SchemaObjectCollection'.
  Source=System.Xml
  StackTrace:
       at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter)

In an effort to make the problem resolve, I replaced the code in SchemaObjectCollection with the version before I created this problem. I've reverted several other files as well and I'm I bit stuck.

I'm probably giving insufficient information for help, but I thought I'd ask.

Thanks in advance for trying!
SOLUTION
Avatar of Miguel Oz
Miguel Oz
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gswitz
gswitz

ASKER

Thanks folks. I ran after the wrong class because I hadn't checked the inner exception. Once I was on to the right class the fix was easy.

Thanks!!