Info about my setup:
- Resharper 2016.3.2
- XUnit 2.2.0
- VS 2017 RTM
- Test Project .net 4.5.2
- Asp.net Core Project .net 4.5.2
Repo Steps:
Create an asp.net core site targeting .net 4.5.2
Add a unit test project or class library to the solution and reference the asp.net project
Create a xunit Fact test that targets a class in the asp.net project
Run the unit test using resharper test runner
Error:
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()
Notes:
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?).
These were things I found but don't indicate how to fix with the new xproj and app.config using MSBuild for VS 2017. https://blogs.msdn.microsoft.com/visualstudioalm/2016/05/30/announcing-mstest-framework-support-for-net-core-rc2-asp-net-core-rc2/

