Could not find file '..\bin\Debug\TestProj.UnitTests.xunit.runner.json'


I get the below exception when debugging an xunit test using .net MVC 5, .net framework version 4.6.2 and visual studio 2019.


System.IO.FileNotFoundException HResult=0x80070002 Message=Could not find file 'Could not find file '..\bin\Debug\TestProj.UnitTests.xunit.runner.json'. Source=mscorlib StackTrace: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) This exception was originally thrown at this call stack: System.IO.__Error.WinIOError(int, string)


Please see the below images.

enter image description here

enter image description here

enter image description here
asked on Stack Overflow Dec 19, 2019 by shailesh M • edited Dec 20, 2019 by shailesh M

1 Answer


for me adding this file was all it took `{projectname}.

and in the file content look like this

    "$schema": ""

also don't forget to set the file to copy on build.

based on documentation found here

answered on Stack Overflow Nov 17, 2020 by workabyte • edited Nov 17, 2020 by Dharman

User contributions licensed under CC BY-SA 3.0