I am trying to use DotCover in FAKE , but it is throwing some error , as I am new to FAKE as well as F# , it's becoming difficult for me to understand the root cause of the problem . Here is the code :
#r "D:/FAKEProject/Fake/packages/FAKE/tools/FakeLib.dll"
open Fake
open Fake.DotCover
let testDir = "D:/FAKEProject/Fake/test/"
let filters = ""
Target "Clean" (fun _ ->
CleanDirs [testDir]
)
Target "TestCoverage" (fun _ ->
!! ("D:/FAKEProject/Fake/UnitTest/UnitTest.dll")
|> DotCoverNUnit
(fun p -> { p with Output = testDir @@ "NUnitDotCover.snapshot"
ToolPath = "D:/tools/dotCover/dotCover.exe"
Filters = filters })
(fun nunitOptions -> nunitOptions)
)
"Clean"
==> "TestCoverage"
RunTargetOrDefault "TestCoverage"`
It is giving this error
System.Exception: Error running D:/tools/dotCover/dotCover.exe with exitcode -1
at Fake.DotCover.buildParamsAndExecute@124-6.Invoke(String message) in C:\code\fake\src\app\FakeLib\DotCover.fs:line 124
at Fake.DotCover.buildParamsAndExecute[a](a parameters, FSharpFunc`2 buildArguments, String toolPath, String workingDir, Boolean failBuild) in C:\code\fake\src\app\FakeLib\DotCover.fs:line 124
at Fake.DotCover.DotCoverNUnit(FSharpFunc`2 setDotCoverParams, FSharpFunc`2 setNUnitParams, IEnumerable`1 assemblies) in C:\code\fake\src\app\FakeLib\DotCover.fs:line 190
at FSI_0005.DotCover.clo@16-2.Invoke(Unit _arg2) in D:\FAKEProject\Fake\DotCover.fsx:line 17
at Fake.TargetHelper.runSingleTarget(TargetTemplate`1 target) in C:\code\fake\src\app\FakeLib\TargetHelper.fs:line 492`
I am not able to understand why it is searching in C:\code\fake\src\app\fakelib\dotcover.fs and what is dotcover.fs it is looking for How to solve this problem , as I am stuck at this error , If anyone can help me regarding this , it would be very helpful .
Thank You