title: How to start using MvvmLight on a .net core 3 WPF app?
body: <p>For a new project I want to try out the new .net core 3.0 WPF project and I want to use it in combination with MvvmLight. However in .net core and in combination with Visual Studio Code you don't get any scaffolding or default project. And then there is the mystery what to do to get it working...</p>
  
  <p>I know I need to do something in app.xaml.cs, mainwindow.xaml and mainwindow.xaml.cs. As well as creating some ViewModelLocator service. But the documentation of MvvmLight is kinda empty on this.</p>
  
  <p>I had found the following question on SO (<a href="https://stackoverflow.com/questions/52457162/mvvmlightlibsstd10-and-uwp">MvvmLightLibsStd10 and UWP</a>), but it isn't complete in my case and I am also unsure whether I should use the normal package or the special std10 version.</p>
  
  <p><strong>Update 2019-06-26</strong>
  I got it to work with the following code, using MvvmLightLibsStd10 version 5.4.1.1.</p>
  
  <p>App.xaml</p>
  
  <pre class="lang-xml prettyprint-override"><code>    &lt;Application.Resources&gt;
          &lt;ResourceDictionary&gt;
              &lt;vm:ViewModelLocator x:Key="Locator" xmlns:vm="clr-namespace:$AssemblyName$.ViewModel" /&gt;
          &lt;/ResourceDictionary&gt;
      &lt;/Application.Resources&gt;
  </code></pre>
  
  <p>MainWindow.xaml</p>
  
  <pre><code>        DataContext="{Binding ValidatorListViewModel, Source={StaticResource Locator}}"&gt;
  </code></pre>
  
  <p>ViewModelLocator.cs</p>
  
  <pre><code>using GalaSoft.MvvmLight.Ioc;
  
  namespace $AssemblyName$.ViewModel
  {
      public class ViewModelLocator
      {
          public ViewModelLocator()
          {
              SimpleIoc.Default.Register&lt;ValidatorListViewModel&gt;();
          }
  
          public ValidatorListViewModel ValidatorListViewModel =&gt; SimpleIoc.Default.GetInstance&lt;ValidatorListViewModel&gt;();
      }
  }
  </code></pre>