title: System.BadImageFormatException when running XUnit 2.2.0 unit test in VS 2017 against a full .net framework asp.net core project
body: <p><strong>Info about my setup:</strong></p>
  
  <ul>
  <li>Resharper 2016.3.2 </li>
  <li>XUnit 2.2.0 </li>
  <li>VS 2017 RTM </li>
  <li>Test Project .net 4.5.2</li>
  <li>Asp.net Core Project .net 4.5.2</li>
  </ul>
  
  <p><strong>Repo Steps:</strong></p>
  
  <ol>
  <li><p>Create an asp.net core site targeting .net 4.5.2</p></li>
  <li><p>Add a unit test project or class library to the solution and reference the asp.net project</p></li>
  <li><p>Create a xunit Fact test that targets a class in the asp.net project</p></li>
  <li><p>Run the unit test using resharper test runner</p></li>
  </ol>
  
  <p><strong>Error:</strong></p>
  
  <p>System.BadImageFormatException
  Could not load file or assembly 'AFAEMS, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
     at AFAEMS.Tests.Class1.return_errors_if_missing_fields()</p>
  
  <p><strong>Notes:</strong></p>
  
  <p>I've done a lot of searching and cannot find any similar issues to this. I can run a unit test with a simple assert that is not targeting the asp.net core class files. I couldn't get the VS test runner to find my xunit tests (maybe b/c resharper test runner is enabled?).</p>
  
  <p>These were things I found but don't indicate how to fix with the new xproj and app.config using MSBuild for VS 2017.
  <a href="https://blogs.msdn.microsoft.com/visualstudioalm/2016/05/30/announcing-mstest-framework-support-for-net-core-rc2-asp-net-core-rc2/" rel="nofollow noreferrer">https://blogs.msdn.microsoft.com/visualstudioalm/2016/05/30/announcing-mstest-framework-support-for-net-core-rc2-asp-net-core-rc2/</a></p>
  
  <p><a href="https://stackoverflow.com/questions/39167176/testing-asp-net-core-on-full-net-framework">Testing Asp.Net Core on full .NET framework</a></p>
  
  <p><a href="https://github.com/dotnet/sdk/issues/926" rel="nofollow noreferrer">https://github.com/dotnet/sdk/issues/926</a></p>