Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/fsharp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/drupal/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
F# 假的+;Nunit:Can';找不到nunit-console.exe_F#_F# Fake_Nunit Console - Fatal编程技术网

F# 假的+;Nunit:Can';找不到nunit-console.exe

F# 假的+;Nunit:Can';找不到nunit-console.exe,f#,f#-fake,nunit-console,F#,F# Fake,Nunit Console,我是FSharp.Charting的维护人员。最近,我们的假测试规则开始被以下报告的错误打破(特别是我调用build.cmd RunTests)。FAKE似乎为nunit控制台(位于packages/nunit.ConsoleRunner/tools/nunit3-console.exe)选择了不正确的路径和exe名称。我不确定这是否是版本控制问题,或者是否需要更新build.fsx脚本以说明对FAKE和/或NUnit的更改。任何指导都将不胜感激 System.Exception: Start

我是FSharp.Charting的维护人员。最近,我们的假测试规则开始被以下报告的错误打破(特别是我调用
build.cmd RunTests
)。FAKE似乎为nunit控制台(位于packages/nunit.ConsoleRunner/tools/nunit3-console.exe)选择了不正确的路径和exe名称。我不确定这是否是版本控制问题,或者是否需要更新build.fsx脚本以说明对FAKE和/或NUnit的更改。任何指导都将不胜感激

System.Exception: Start of process c:\GitHub\FSharp.Charting_20180310\tools\Nunit\nunit-console.exe failed. The system cannot find the file specified
at Fake.ProcessHelper.ExecProcessWithLambdas@91-16.Invoke(String message) in C:\code\fake\src\app\FakeLib\ProcessHelper.fs:line 91
at Fake.ProcessHelper.ExecProcessWithLambdas(FSharpFunc2 configProcessStartInfoF, TimeSpan timeOut, Boolean silent, FSharpFunc2 errorF, FSharpFunc2 messageF) in C:\code\fake\src\app\FakeLib\ProcessHelper.fs:line 91 
at Fake.NUnitSequential.NUnit(FSharpFunc2 setParams, IEnumerable1 assemblies) in C:\code\fake\src\app\FakeLib\UnitTest\NUnit\Sequential.fs:line 26 
at FSI_0005.Build.clo@113-10.Invoke(Unit _arg6) at Fake.TargetHelper.runSingleTarget(TargetTemplate1 target) in C:\code\fake\src\app\FakeLib\TargetHelper.fs:line 626
paket.lock的一些相关内容:

FAKE (4.61.3) - framework: net40, net45, net461
NUnit (3.7.1) - framework: net40, net45, net461
NUnit.ConsoleRunner (3.6.1) - framework: net40, net45, net461
NUnit.Runners (3.6.1) - framework: net40, net45, net461
NUnit.ConsoleRunner (>= 3.6.1) - framework: net40, net45, net461

EDIT:修复了build.cmd测试命令,并提供了显式nunit控制台路径。

根据@Charles Mager的其他注释,有两种可能的解决方案:


  • 多亏了@TeaDrivenDev,我发现FAKE(v4)和NUnit之间存在版本错位,无法下载最新的v3版本。这可以通过将paket.dependencies中的NUnit和NUnit.runner钳制到2.6.3或更高版本来实现,直到看起来您需要在
    NUnitParameters
    记录中显式设置
    ToolPath
    值,因为它与默认路径不同:这是一个指向正确方向的指针。我将ToolPath设置为“packages/NUnit.ConsoleRunner/tools/”,现在错误表明它找不到NUnit-console.exe,而NUnit.ConsoleRunner会删除nunit3-console.exe。请注意,您的链接文档与FAKE 5相关,我有FAKE 4,尽管paket.dependencies中没有指定版本。听起来我要么在paket.dependencies中强制使用FAKE 5,要么强制使用NUnit 2.x。假设没有其他中断,FAKE 5可能是更好的选择-我不知道为什么默认情况下它还没有下载。@RobertSim FAKE 5目前是预发行版,这就是paket解析FAKE 4的原因。快速查看FAKE 4源代码,是否有一个默认版本?尝试在构建脚本中将
    NUnit
    更改为
    NUnit3