Unknown test framework

Hemant Joshi's Avatar

Hemant Joshi

16 Oct, 2018 11:16 AM

I am getting an error as System.InvalidOperationException: Unknown test framework: could not find xunit.dll (v1) or xunit.execution.*.dll (v2) in C:\projects\letsdisc\test\LetsDisc.Tests.

My AppVeyor File looks like below -

version: 1.0.{build}
image: Visual Studio 2017
skip_tags: true
 - nuget restore
 - msbuild /verbosity:quiet LetsDisc.sln
 - .\packages\OpenCover.4.6.519\tools\OpenCover.Console.exe -register:user -target:"%xunit20%\xunit.console.x86.exe" -targetargs:"test\LetsDisc.Tests\bin\Release\netcoreapp2.1\LetsDisc.Tests.dll -noshadow" -output:"coverage.xml" -filter:"+[LetsDisc*]* -[Tests*]*"
  - ps: |
      $env:PATH = 'C:\msys64\usr\bin;' + $env:PATH
      Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh
      bash codecov.sh -f "coverage.xml"
  1. 1 Posted by Ilya Finkelshte... on 16 Oct, 2018 04:31 PM

    Ilya Finkelshteyn's Avatar

    Hi Herman,

    I looked up your build to understand the issue better, but I see that it is already green. It seems that you alredy fixed the problem. Please let us know if you still need help.


  2. 2 Posted by Owen McDonnell on 16 Oct, 2018 06:12 PM

    Owen McDonnell's Avatar

    I believe you need to point opencover towards a built dll and not a project file. Though i can't tell whether or not your dll built since verbosity is set to quiet.

  3. 3 Posted by Hemant on 17 Oct, 2018 05:23 AM

    Hemant's Avatar

    Hello llya and Owen,

    Thanks for looking into it. I have changed %xunit20%\xunit.console.x86.exe to C:/Program Files/dotnet/dotnet.exe and changed the -targetArgs to run the test. It works now.

  4. 4 Posted by Ilya Finkelshte... on 17 Oct, 2018 05:24 AM

    Ilya Finkelshteyn's Avatar

    Good, thanks a lot for the update!

  5. Ilya Finkelshteyn closed this discussion on 17 Oct, 2018 05:24 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac