title: Prism AutoWireViewModel throws exception in release mode
body: <p>I am writing a WPF MVVM application using prism and MahApps.</p>
  
  <p>When I run my code in debug mode, everything works fine.</p>
  
  <p>When I run it in release mode, I get <code>Set property 'Prism.Mvvm.ViewModelLocator.AutoWireViewModel' threw an exception</code></p>
  
  <p>Here's my window control in the .xaml</p>
  
  <pre><code>&lt;ma:MetroWindow x:Class="RoviPutt.Views.MainWindow"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:dd="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop"
          xmlns:ma="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
          xmlns:prism="http://prismlibrary.com/"
          prism:ViewModelLocator.AutoWireViewModel="True"
          Icon="/images/favicon.ico"
          WindowStartupLocation="CenterScreen"
          Title="RoviPutt" Height="750" Width="1200" Background="#252525"&gt;
  </code></pre>
  
  <p>In the .xaml.cs</p>
  
  <pre><code>namespace RoviPutt.Views
  {
      public partial class MainWindow
      {
          public MainWindow()
          {
              InitializeComponent();
          }
      }
  }
  </code></pre>
  
  <p>And in my ViewModel</p>
  
  <pre><code>namespace RoviPutt.ViewModels
  {
      class MainWindowViewModel : BindableBase, IDropTarget
      {
          public MainWindowViewModel()
          {
  
          }
      }
  }
  </code></pre>
  
  <p>Any idea what I might be doing wrong?</p>