2

I saw Xunit Unit Tests will not run that seems specific to VS 2017. I am having the same problem with VS 2019. I can try to run the test via the Test Explorer or run the tests by right clicking on the test. Either way the test never runs. I have tried Debug an setting a breakpoint at the first line of the test. The breakpoint never gets hit. Similaryly I have tried debugging the test from the Test Explorer. Even if I bypass debug and just run the test the result always shows as "Not Run". I am not sure why the test will not run. None of the steps for VS 2017 seem to make a difference for VS 2019. How can I get my test to run?

Kevin Burton
  • 2,032
  • 4
  • 26
  • 43

1 Answers1

0

If you are compiling x64 there is an option to run tests with a specific platform in the test menu. Change selection from x86 to x64.

  • Maybe I set the wrong setting bug this didn't seem to have any effect. I changed the setting in the test project under 'Build' from 'Any CPU' to x64. That was the closest setting I could see. But like I said it didn't work. – Kevin Burton Mar 26 '20 at 14:17
  • https://stackoverflow.com/a/50571848/7572443. It may not be the setting you need but it has been the issue for me many times. – Eliel Amora Mar 29 '20 at 00:24