title: TypeInitializationException exception on creating an object
body: <p>I have an assembly (class library project in .Net 3.5) that has some references like <code>System.Configuration</code> and <code>System.Web</code>. I use it on a web application and it works fine.</p>
  
  <p>Now, I need to make a reference to a Windows Forms project and I can't understand what is happening. When I try to create an instance of my class it does not work; an exception of type  <code>TypeInitializationException</code> is thrown.</p>
  
  <p>I try to create other instances of my assembly and those work, except this specific class.</p>
  
  <p>Does anybody know what is happening?</p>