What to do when a type is not marked as Serializable…
So I was trying to implement NUnit’s EvenListener interface so I could integrate NUnit into Emonic when I hit upon the error above. The runtime just didn’t want to consume my listener for some reasons. So I did what any Java programmer would do, I updated my class to implement the System.Runtime.Serialization.ISerializable interface. Unfortunately, that didn’t cut it. Next, I tried to flag my class with the [Serializable] attribute. That didn’t go over well, now my application didn’t even want to run.
I eventually discovered that I had to have my class extend MarshalByRefObject after looking at some EventListener implementations within NUnit’s source code. I don’t know why I need to do this, but I resolved the error, so, whatever.