title: assembly alias reference dependency object exception
body: <p>I have a project that has the "System.dll" and "System.Windows.dll" and both are needed. </p>
  
  <p>You will see in the code below when trying to reference my aliased assembly (right clicked on the assembly in the project -> went to properties and changed the alias from global to MediaLibrary) I get the follower error.</p>
  
  <p>I appreciate your help and guidance.</p>
  
  <pre><code> #region Usings
  
   using System;
   using System.IO;
   extern alias MediaLibrary;
   using Media = MediaLibrary.System.Windows.Media.Imaging;
  
  #endregion Usings
  
  #region Public methods
  
  public void foo()
  {
  ...
  // ERROR HERE : TypeInitializationException occured. The type initializer
  //              for 'System.Windows.DependencyObject' threw an exception.
  Media.BitmapImage image = new Media.BitmapImage(); 
  image.SetSource(new MemoryStream(byteBuffer));
  ...
  }
  
  #endregion Public methods
  </code></pre>