title: Common Language Runtime detected an invalid program?
body: <p>I have this error repeating continuously in my program.</p>
  
  <p>I have tried the following:</p>
  
  <ol>
  <li>Restart Visual Studio</li>
  <li>Clean and Rebuild Solution</li>
  </ol>
  
  <p>When I step through the code line by line, it stops leaving me totally confused at a method call:</p>
  
  <pre><code>GenerateWorksheetPart1Content(WorksheetPart worksheetPart1)
  </code></pre>
  
  <p>I don't understand why it stops there. The parameter is not null at the point. What could be causing the error?</p>