XML Serialization exception when resuming from hibernation
<p>I am running W7 on <strong>Parallels Desktop 6</strong> (OSX VM).</p>

<p>The code used for serialization look like:</p>

<pre><code>XmlSerializer(message.GetType());
</code></pre>

<p>where GetType returns the standard .NET type.</p>

<p>The code works fine until I go to hibernate and then resume. After i resume the runtime code that tries to serialize the message throws the below exception:</p>

<pre><code>An exception has been caught while trying to write message
System.InvalidOperationException: Unable to generate a temporary class (result=1).
error CS0583: Internal Compiler Error (0xc0000006 at address 6F601554): likely culprit is 'IMPORT'.
error CS0587: Internal Compiler Error: stage 'IMPORT'
error CS0587: Internal Compiler Error: stage 'PARSE'
error CS0587: Internal Compiler Error: stage 'BEGIN'

   at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
   at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)
   at System.Xml.Serialization.XmlSerializer.GenerateTempAssembly(XmlMapping xmlMapping, Type type, String defaultNamespace)
   at System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace)
   at System.Xml.Serialization.XmlSerializer..ctor(Type type)
</code></pre>

<p>Any help will be much appreciated.</p>
