title: ArgumentException Identifier ' ' is not CLS-compliant. On Serialization
body: <p>I'm having a trouble debugging this problem.</p>
  
  <p>It has occurred twice now in an application I'm working on and only happens when the program is run in release mode. The program runs fine in debug mode :-(</p>
  
  <p>I get the ArgumentException when I attempt to serialize an object. I tracked the first exception down to when the following variable was serialized:</p>
  
  <pre><code>public SerializableDictionary&lt;MyEnum1, SerializableDictionary&lt;MyEnum2, Double&gt;&gt; my_collection;
  </code></pre>
  
  <p>I evaded the issue by replacing MyEnum2 with a string, evading the issue it then cropped up again in a total different area of the program. This time, when an object containing the following variable is serialized:</p>
  
  <pre><code>public SerializableDictionary&lt;MyEnum1, MyObject&gt; my_other_collection;
  </code></pre>
  
  <p>In both instances i'm using Paul Welter's <a href="http://weblogs.asp.net/pwelter34/archive/2006/05/03/444961.aspx" rel="nofollow">SerializableDictionary</a> object. I have used this on previous releases of the program and have never run into this problem. The Exception for the latter is as follows:</p>
  
  <pre><code>System.ArgumentException: Identifier ' ' is not CLS-compliant.
      Parameter name: ident
  </code></pre>
  
  <p>A full dump of the Exception can be viewed on <a href="http://pastebin.com/vhvCsHPr" rel="nofollow">pastebin</a></p>
  
  <p>I have viewed a number of posts with CLS-compliant warnings/errors on SO but they don't seem to be the same problem. I would appreciate some tips on how I can debug this issue further, as the exception only occurs when run in release mode I'm running out of ideas!</p>