title: Unity resolution fails in release mode
body: <p>When I deploy my app to Android device in release mode, I get the following error in the application output...</p>
  
  <pre><code>Unity.Exceptions.ResolutionFailedException: Resolution of the dependency failed, type = 'Hello.MainPage', name = '(none)'.
  </code></pre>
  
  <p>That's the first thing it attempts to resolve. I've tried changing the first type that's resolved and it's the same result. So, for some reason, Unity apparently doesn't work in release mode. (Although it has in the past.)</p>
  
  <p>I've reduced MainPage down to the following...</p>
  
  <pre><code>public class MainPage : TabbedPage
  {
  
  }
  </code></pre>
  
  <p>... so there are no sub resolutions that are failing. It's simply not there even though I add this prior to the call...</p>
  
  <pre><code>Container.RegisterType&lt;MainPage&gt;();
  </code></pre>
  
  <p>Why might this fail in release mode but not in debug mode?</p>
  
  <p>If I set the app's main page property to a <code>TabbedPage</code>, then the app doesn't crash.</p>
  
  <p>This does work...</p>
  
  <pre><code>    Container.RegisterInstance&lt;string&gt;("I love computers");
  
      string s = Container.Resolve&lt;string&gt;();
  </code></pre>
  
  <p>This doesn't work...</p>
  
  <pre><code>    Container.RegisterType&lt;MainPage&gt;();
  
      MainPage = Container.Resolve&lt;MainPage&gt;();
  </code></pre>
  
  <p>This does work...</p>
  
  <pre><code>MainPage = new MainPage();
  </code></pre>
  
  <p>This does work...</p>
  
  <pre><code>    Container.RegisterInstance(new MainPage());
  
      MainPage = Container.Resolve&lt;MainPage&gt;();
  </code></pre>
  
  <p>It's as if the concrete types aren't being included in the bundle unless they're new'ed up somewhere.</p>
  
  <p>I thought I might need to add the <code>[Preserve]</code> attribute to injected classes, but it makes no difference.</p>
  
  <p>Seems to be the result of setting the linker to "Link all assemblies".</p>