Unknown test framework
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
before_build:
- nuget restore
build_script:
- msbuild /verbosity:quiet LetsDisc.sln
test_script:
- .\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*]*"
after_test:
- 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"
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | 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
1 Posted by Ilya Finkelshte... on Oct 16, 2018 @ 04:31 PM
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.
Ilya.
Support Staff 2 Posted by Owen McDonnell on Oct 16, 2018 @ 06:12 PM
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 Posted by Hemant on Oct 17, 2018 @ 05:23 AM
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 Posted by Ilya Finkelshte... on Oct 17, 2018 @ 05:24 AM
Good, thanks a lot for the update!
Ilya Finkelshteyn closed this discussion on Oct 17, 2018 @ 05:24 AM.