title: How to prevent an assembly from loading when not used
body: <p>I am working in Winforms, C# .NET4.5</p>
  
  <p>I have a class in assembly A called classA, which provides method1</p>
  
  <p>In my main assembly I can call this method, but in some cases I am 100% sure that
  this can not happen because of some internal flag from a registry key:</p>
  
  <pre><code>if( valueFromRegistryIsAlwaysFalse)
  {
     var A = new classA();
     A.method1();
  }
  </code></pre>
  
  <p>When I set this value in the registry I do not want to provide assembly A with the main executable, however even when I do not use the method it needs assembly A to start. Of course I get this, however is there some way of getting around this?</p>