My application generates a bunch of serialization assemblies on start up. In this case I am getting an error because the XmlSerializer is failing to generate one of the serialization assemblies. I can go and check the temporary code file being generated and I see that it contains invalid characters (just one). This an example from one of the temporary files:
Reader.MoveToElement();
if (Reader.IsEmptyElement) {
Reader.Skip();
$ return o;
}
As you can see the "$" is an invalid character. This makes csc.exe fails later on.
What could make XmlSerializer generate such a file.