-
Notifications
You must be signed in to change notification settings - Fork 583
Closed
Description
Description
VSTest in FAKE target fails due to not finding path to vstest.console.exe.
Repro steps
-
Install VS 2019
-
Run a FAKE target with
VSTestin it
Expected behavior
VSTest finds the correct path and runs tests.
Actual behavior
VSTest throws error Start of process '' failed.:
-> BuildFailedException: Target 'TestInstaller' failed.
2020-08-11T09:23:18.7063722Z StackTrace:
2020-08-11T09:23:18.7070991Z at Fake.Core.TargetModule.raiseIfError(OptionalTargetContext context) in D:\a\1\s\src\app\Fake.Core.Target\Target.fs:line 991
2020-08-11T09:23:18.7071168Z at Fake.Core.TargetModule.runOrDefault(String defaultTarget) in D:\a\1\s\src\app\Fake.Core.Target\Target.fs:line 1173
2020-08-11T09:23:18.7071289Z at <StartupCode$build_8FDFF36D859B2BED12FFE7DBBA8C89D47F458626B1D11A739C217CB7AC269D5E>.$Build$fsx.main@() in D:\_2\43\s\build.fsx:line 598
2020-08-11T09:23:18.7071541Z -> One or more errors occurred. (Start of process '' failed.)
2020-08-11T09:23:18.7071785Z -> Start of process '' failed.
2020-08-11T09:23:18.7165741Z StackTrace:
2020-08-11T09:23:18.7172865Z at Fake.Core.Process.processStarter@415.Invoke(RawCreateProcess c, Process p) in D:\a\1\s\src\app\Fake.Core.Process\Process.fs:line 427
2020-08-11T09:23:18.7173307Z at Fake.Core.RawProc.start@207(FSharpFunc`2 startProcessRaw, RawCreateProcess c, ProcessStartInfo p, StreamSpecs streamSpec, Process toolProcess, CancellationTokenSource tok, FSharpRef`1 isStarted, FSharpRef`1 readOutputTask, FSharpRef`1 readErrorTask, FSharpRef`1 redirectStdInTask, Unit unitVar0) in D:\a\1\s\src\app\Fake.Core.Process\RawProc.fs:line 210
2020-08-11T09:23:18.7173485Z at Fake.Core.RawProc.syncStart@268.Invoke(Unit unitVar0) in D:\a\1\s\src\app\Fake.Core.Process\RawProc.fs:line 270
2020-08-11T09:23:18.7173606Z --- End of stack trace from previous location where exception was thrown ---
2020-08-11T09:23:18.7173698Z at Microsoft.FSharp.Control.AsyncResult`1.Commit() in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 349
2020-08-11T09:23:18.7173815Z at Microsoft.FSharp.Control.AsyncPrimitives.RunSynchronouslyInCurrentThread[a](CancellationToken cancellationToken, FSharpAsync`1 computation) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 870
2020-08-11T09:23:18.7173942Z at Microsoft.FSharp.Control.AsyncPrimitives.RunSynchronously[T](CancellationToken cancellationToken, FSharpAsync`1 computation, FSharpOption`1 timeout) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 890
2020-08-11T09:23:18.7174214Z at Microsoft.FSharp.Control.FSharpAsync.RunSynchronously[T](FSharpAsync`1 computation, FSharpOption`1 timeout, FSharpOption`1 cancellationToken) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 1151
2020-08-11T09:23:18.7174334Z at Fake.DotNet.Testing.VSTest.run(FSharpFunc`2 setParams, IEnumerable`1 assemblies) in D:\a\1\s\src\app\Fake.DotNet.Testing.VSTest\VSTest.fs:line 167
2020-08-11T09:23:18.7174419Z at Build.clo@196-8.Invoke(TargetParameter _arg4) in D:\_2\43\s\build.fsx:line 208
2020-08-11T09:23:18.7174513Z at Fake.Core.TargetModule.runSimpleInternal(TargetContext context, Target target) in D:\a\1\s\src\app\Fake.Core.Target\Target.fs:line 300
2020-08-11T09:23:18.7174607Z -> InvalidOperationException: Cannot start process because a file name has not been provided.
2020-08-11T09:23:18.7174672Z StackTrace:
2020-08-11T09:23:18.7174750Z at System.Diagnostics.Process.Start()
2020-08-11T09:23:18.7174830Z at Fake.Core.Process.processStarter@415.Invoke(RawCreateProcess c, Process p) in D:\a\1\s\src\app\Fake.Core.Process\Process.fs:line 425
Known workarounds
Set the ToolPath parameter (path to vstest.console.exe) on VSTest call.
Related information
- Windows 10
- .NET Runtime 3.1.6
- Version of FAKE 5.20.2
Metadata
Metadata
Assignees
Labels
No labels