title: How to reference a WPF .NET Core dll in WPF .net framework
body: <p>From Visual Studio 2019, I've created a WPF project in .NET Core. The project name is <code>test1</code>.</p>
  
  <p>The dll of <code>test1</code> project is added in WPF .NET framework from Visual Studio 2017 using reference option.</p>
  
  <p><a href="https://i.stack.imgur.com/chObC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/chObC.png" alt="enter image description here"></a></p>
  
  <p>After adding dll, I tried to call MainWindow from Test project in .NET Framework</p>
  
  <pre><code>var test = new Test.MainWindow()
  test.SHowdialog()
  </code></pre>
  
  <p>When I tried to run it, I got the below error. Can anyone please help me to resolve this issue?</p>
  
  <blockquote>
    <p>System.IO.FileLoadException: 'Could not load file or assembly
    'System.Runtime, Version=4.2.2.0, Culture=neutral,
    PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The
    located assembly's manifest definition does not match the assembly
    reference. (Exception from HRESULT: 0x80131040)'</p>
  </blockquote>