title: UWP - Unable to load DLL 'realm-wrappers'
body: <p>I have a Xamarin/Realm app that I created using Visual Studio 2017 on Win10. It targets iOS, Android and UWP. I'm trying to build this solution on Windows and macOS.</p>
  
  <p>I added Realm in macOS and successfully tested my app on Android and iOS. Then when I moved back to my windows machine. It's currently targetting UWP. When I run the app on my Local Machine, I see the following runtime exception:</p>
  
  <pre><code>System.TypeInitializationException occurred
    HResult=0x80131534
    Message=The type initializer for 'Realms.Realm' threw an exception.
    Source=&lt;Cannot evaluate the exception source&gt;
    StackTrace:
     at Realms.Realm.GetInstance(RealmConfigurationBase config)
     at MouseDroid.MainPageViewModel..ctor() in C:\Users\hmurphy\Documents\Pittsh\Projects\mouse_droid\MouseDroid\MainPageViewModel.cs:line 20
     at MouseDroid.MainPage..ctor() in C:\Users\hmurphy\Documents\Pittsh\Projects\mouse_droid\MouseDroid\MainPage.xaml.cs:line 28
     at MouseDroid.App..ctor() in C:\Users\hmurphy\Documents\Pittsh\Projects\mouse_droid\MouseDroid\App.xaml.cs:line 17
     at MouseDroid.UWP.MainPage..ctor() in C:\Users\hmurphy\Documents\Pittsh\Projects\mouse_droid\MouseDroid.UWP\MainPage.xaml.cs:line 24
     at MouseDroid.UWP.MouseDroid_UWP_XamlTypeInfo.XamlTypeInfoProvider.Activate_4_MainPage() in C:\Users\hmurphy\Documents\Pittsh\Projects\mouse_droid\MouseDroid.UWP\obj\x64\Debug\XamlTypeInfo.g.cs:line 207
     at MouseDroid.UWP.MouseDroid_UWP_XamlTypeInfo.XamlUserType.ActivateInstance() in C:\Users\hmurphy\Documents\Pittsh\Projects\mouse_droid\MouseDroid.UWP\obj\x64\Debug\XamlTypeInfo.g.cs:line 429
  
  Inner Exception 1:
  DllNotFoundException: Unable to load DLL 'realm-wrappers': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
  </code></pre>
  
  <p>This happens inside my <code>MainPageViewModel</code> with the call to <code>GetInstance</code>:</p>
  
  <pre><code>public class MainPageViewModel
  {
      public IEnumerable&lt;Package&gt; Packages { get; private set; }
  
      public INavigation Navigation { get; set; }
  
      private Realm _realm;
  
      public MainPageViewModel() 
      {
          _realm = Realm.GetInstance();
  
          Packages = _realm.All&lt;Package&gt;();
      }
  }
  </code></pre>
  
  <p>I'm using 1.5.0. According to this <a href="https://github.com/realm/realm-dotnet/commit/daf3077f4fc6f3d8ad9bfd80f190f52df0e2b6a5" rel="nofollow noreferrer">commit</a>, it seems like this shouldn't be an issue.</p>
  
  <p>My configuration is using x86 for UWP. UWP is set to build and deploy. I have re-built my solution, just in case <code>FodyWeaver</code> objects were not generated properly. Am I missing something?</p>