From fa4678d3ed4bfb32e208f9abfa00a33dcaa2b34b Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Fri, 5 Jan 2024 22:41:58 +0100 Subject: [PATCH] feature/fsharp bindings (#7) * Introduce F# CE bindings through Proc.Fs * update build scripts * update build scripts * update build scripts * update build scripts * update tests * update waittime * update waittime * update build tools * mark ScratchPad.Fs as unpackable * ensure we check for build info in InformationalVersion * update minver reference --- .github/workflows/ci.yml | 4 +- Directory.Build.props | 4 +- build/scripts/CommandLine.fs | 10 +- build/scripts/Paths.fs | 2 +- build/scripts/Targets.fs | 2 +- build/scripts/scripts.fsproj | 2 +- dotnet-tools.json | 8 +- examples/ScratchPad.Fs/Program.fs | 19 ++ examples/ScratchPad.Fs/ScratchPad.Fs.fsproj | 16 ++ examples/ScratchPad/ScratchPad.csproj | 2 +- examples/ScratchPad/TestBinary.cs | 2 +- global.json | 2 +- proc.sln | 14 ++ src/Proc.ControlC/Proc.ControlC.csproj | 2 +- src/Proc.Fs/Bindings.fs | 183 ++++++++++++++++++ src/Proc.Fs/Proc.Fs.fsproj | 44 +++++ src/Proc/Proc.Exec.cs | 36 ++-- src/Proc/Proc.Start.cs | 40 ++-- src/Proc/Proc.csproj | 2 +- .../Proc.Tests.Binary.csproj | 2 +- tests/Proc.Tests/Proc.Tests.csproj | 2 +- tests/Proc.Tests/TestsBase.cs | 2 +- 22 files changed, 335 insertions(+), 65 deletions(-) create mode 100644 examples/ScratchPad.Fs/Program.fs create mode 100644 examples/ScratchPad.Fs/ScratchPad.Fs.fsproj create mode 100644 src/Proc.Fs/Bindings.fs create mode 100644 src/Proc.Fs/Proc.Fs.fsproj diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0ab86bd..54a8f62 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ on: jobs: build: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: @@ -30,7 +30,7 @@ jobs: dotnet-version: '3.1.201' - uses: actions/setup-dotnet@v1 with: - dotnet-version: '5.0.100' + dotnet-version: '8.0.100' source-url: https://nuget.pkg.github.com/nullean/index.json env: NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/Directory.Build.props b/Directory.Build.props index 839bf68..57e91e2 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,11 +1,11 @@  - canary + canary.0 0.2 - + all diff --git a/build/scripts/CommandLine.fs b/build/scripts/CommandLine.fs index 940c09a..eb5c641 100644 --- a/build/scripts/CommandLine.fs +++ b/build/scripts/CommandLine.fs @@ -25,11 +25,11 @@ with interface IArgParserTemplate with member this.Usage = match this with - | Clean _ -> "clean known output locations" - | Build _ -> "Run build" - | Test _ -> "Runs build then tests" - | Release _ -> "runs build, tests, and create and validates the packages shy of publishing them" - | Publish _ -> "Runs the full release" + | Clean -> "clean known output locations" + | Build -> "Run build" + | Test -> "Runs build then tests" + | Release -> "runs build, tests, and create and validates the packages shy of publishing them" + | Publish -> "Runs the full release" | SingleTarget _ -> "Runs the provided sub command without running their dependencies" | Token _ -> "Token to be used to authenticate with github" diff --git a/build/scripts/Paths.fs b/build/scripts/Paths.fs index dc90715..8469cd2 100644 --- a/build/scripts/Paths.fs +++ b/build/scripts/Paths.fs @@ -9,7 +9,7 @@ let MainTFM = "netstandard2.0" let SignKey = "96c599bbe3e70f5d" let ValidateAssemblyName = true -let IncludeGitHashInInformational = false +let IncludeGitHashInInformational = true let GenerateApiChanges = true let Root = diff --git a/build/scripts/Targets.fs b/build/scripts/Targets.fs index 86aa30d..0803530 100644 --- a/build/scripts/Targets.fs +++ b/build/scripts/Targets.fs @@ -17,7 +17,7 @@ let private restoreTools = lazy(exec "dotnet" ["tool"; "restore"]) let private currentVersion = lazy( restoreTools.Value |> ignore - let r = Proc.Start("dotnet", "minver", "-d", "canary", "-m", "0.1") + let r = Proc.Start("dotnet", "minver", "-p", "canary.0", "-m", "0.1") let o = r.ConsoleOut |> Seq.find (fun l -> not(l.Line.StartsWith("MinVer:"))) o.Line ) diff --git a/build/scripts/scripts.fsproj b/build/scripts/scripts.fsproj index b0377d4..dbe08c2 100644 --- a/build/scripts/scripts.fsproj +++ b/build/scripts/scripts.fsproj @@ -2,7 +2,7 @@ Exe - net5.0 + net8.0 false diff --git a/dotnet-tools.json b/dotnet-tools.json index 8e7bee6..3f257d1 100644 --- a/dotnet-tools.json +++ b/dotnet-tools.json @@ -3,25 +3,25 @@ "isRoot": true, "tools": { "minver-cli": { - "version": "2.3.1", + "version": "4.3.0", "commands": [ "minver" ] }, "release-notes": { - "version": "0.3.0", + "version": "0.6.0", "commands": [ "release-notes" ] }, "nupkg-validator": { - "version": "0.4.0", + "version": "0.6.0", "commands": [ "nupkg-validator" ] }, "assembly-differ": { - "version": "0.13.0", + "version": "0.15.0", "commands": [ "assembly-differ" ] diff --git a/examples/ScratchPad.Fs/Program.fs b/examples/ScratchPad.Fs/Program.fs new file mode 100644 index 0000000..e63e6d8 --- /dev/null +++ b/examples/ScratchPad.Fs/Program.fs @@ -0,0 +1,19 @@ +open Proc.Fs + +let uname = shell { + exec "dotnet" "--version" + exec "uname" +} + +let dotnetVersion = exec { + binary "dotnet" + args "--help" + filter (fun l -> l.Line.Contains "clean") +} + +printfn "Found lines %i" dotnetVersion.Length + +let dotnetRestoreHelp = exec { + binary "dotnet" + invoke_args ["restore"; "--help"] +} diff --git a/examples/ScratchPad.Fs/ScratchPad.Fs.fsproj b/examples/ScratchPad.Fs/ScratchPad.Fs.fsproj new file mode 100644 index 0000000..33b3c9b --- /dev/null +++ b/examples/ScratchPad.Fs/ScratchPad.Fs.fsproj @@ -0,0 +1,16 @@ + + + + Exe + net8.0 + false + + + + + + + + + + diff --git a/examples/ScratchPad/ScratchPad.csproj b/examples/ScratchPad/ScratchPad.csproj index c491f7e..cec76a3 100644 --- a/examples/ScratchPad/ScratchPad.csproj +++ b/examples/ScratchPad/ScratchPad.csproj @@ -1,7 +1,7 @@  Exe - net5.0 + net8.0 false diff --git a/examples/ScratchPad/TestBinary.cs b/examples/ScratchPad/TestBinary.cs index 2e2b3d6..f012edb 100644 --- a/examples/ScratchPad/TestBinary.cs +++ b/examples/ScratchPad/TestBinary.cs @@ -34,7 +34,7 @@ public static StartArguments TestCaseArguments(string testcase) => private static string GetDll() { - var dll = Path.Combine("bin", GetRunningConfiguration(), "net5.0", _procTestBinary + ".dll"); + var dll = Path.Combine("bin", GetRunningConfiguration(), "net8.0", _procTestBinary + ".dll"); var fullPath = Path.Combine(GetWorkingDir(), dll); if (!File.Exists(fullPath)) throw new Exception($"Can not find {fullPath}"); diff --git a/global.json b/global.json index 2675d76..789bff3 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "5.0.100", + "version": "8.0.100", "rollForward": "latestFeature", "allowPrerelease": false } diff --git a/proc.sln b/proc.sln index 126668f..e34d5ec 100644 --- a/proc.sln +++ b/proc.sln @@ -37,6 +37,10 @@ EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{E4B3DD3A-E36C-46D6-B35E-D824EB9B3C06}" EndProject +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Proc.Fs", "src\Proc.Fs\Proc.Fs.fsproj", "{5EA4E26F-F623-473D-9CD7-E590A3E54239}" +EndProject +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "ScratchPad.Fs", "examples\ScratchPad.Fs\ScratchPad.Fs.fsproj", "{C33E3F7C-0C2A-4DD2-91E4-328866195997}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -67,6 +71,14 @@ Global {D6997ADC-E933-418E-831C-DE1A78897493}.Release|Any CPU.ActiveCfg = Release|Any CPU {D6997ADC-E933-418E-831C-DE1A78897493}.Debug|Any CPU.Build.0 = Debug|Any CPU {D6997ADC-E933-418E-831C-DE1A78897493}.Release|Any CPU.Build.0 = Release|Any CPU + {5EA4E26F-F623-473D-9CD7-E590A3E54239}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5EA4E26F-F623-473D-9CD7-E590A3E54239}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5EA4E26F-F623-473D-9CD7-E590A3E54239}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5EA4E26F-F623-473D-9CD7-E590A3E54239}.Release|Any CPU.Build.0 = Release|Any CPU + {C33E3F7C-0C2A-4DD2-91E4-328866195997}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C33E3F7C-0C2A-4DD2-91E4-328866195997}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C33E3F7C-0C2A-4DD2-91E4-328866195997}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C33E3F7C-0C2A-4DD2-91E4-328866195997}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -78,5 +90,7 @@ Global {D3AFFBE0-8F40-42C7-8A6A-BCCD2EDF4A3E} = {0F267D58-B5AA-4D04-B346-12B283E37B68} {E7AD2461-309A-4BA7-A6EB-5C1F4F882BC2} = {E4B3DD3A-E36C-46D6-B35E-D824EB9B3C06} {D6997ADC-E933-418E-831C-DE1A78897493} = {E89606EC-111B-4151-997C-8006627F1926} + {5EA4E26F-F623-473D-9CD7-E590A3E54239} = {9C336E9A-3FC8-4F77-A5B4-1D07E4E54924} + {C33E3F7C-0C2A-4DD2-91E4-328866195997} = {E4B3DD3A-E36C-46D6-B35E-D824EB9B3C06} EndGlobalSection EndGlobal diff --git a/src/Proc.ControlC/Proc.ControlC.csproj b/src/Proc.ControlC/Proc.ControlC.csproj index f18d453..1c11ba7 100644 --- a/src/Proc.ControlC/Proc.ControlC.csproj +++ b/src/Proc.ControlC/Proc.ControlC.csproj @@ -5,6 +5,6 @@ false - + \ No newline at end of file diff --git a/src/Proc.Fs/Bindings.fs b/src/Proc.Fs/Bindings.fs new file mode 100644 index 0000000..b19cfcf --- /dev/null +++ b/src/Proc.Fs/Bindings.fs @@ -0,0 +1,183 @@ +module Proc.Fs + +open System +open ProcNet +open ProcNet.Std + +let execWithTimeout binary args timeout = + let opts = + ExecArguments(binary, args |> List.map (sprintf "\"%s\"") |> List.toArray) + let options = args |> String.concat " " + printfn ":: Running command: %s %s" binary options + let r = Proc.Exec(opts, timeout) + + match r.HasValue with + | true -> r.Value + | false -> failwithf "invocation of `%s` timed out" binary + +///executes +let exec2 (binary: string) (args: string list): int = + execWithTimeout binary args (TimeSpan.FromMinutes 10) + +let private redirected (binary: string) (args: string list) : ProcessCaptureResult = + Proc.Start(binary, args |> Array.ofList) + +type RunningStatus = { + LastExitCode: int + GrepOutput: Std.LineOut list option +} +type ShellBuilder() = + + member t.Yield _ = None + + [] + member inline this.ExecuteWithArguments(status, binary, [] args: string array) = + let exitCode = exec2 binary (args |> List.ofArray) + match status with + | None -> + Some { LastExitCode = exitCode; GrepOutput = None } + | Some s -> + Some { s with LastExitCode = exitCode } + + [] + member this.Grep(status, searchForRe, binary, [] args: string array) = + let r = Proc.Start(binary, args) + let o = + r.ConsoleOut + |> Seq.filter (_.Line.Contains(searchForRe)) + |> List.ofSeq + + match status with + | None -> + Some { LastExitCode = 0; GrepOutput = Some o } + | Some s -> + Some { LastExitCode = 0; GrepOutput = Some o } + +let shell = ShellBuilder() + +type ExecOptions = { + Binary: string + Arguments: string list option + LineOutFilter: (LineOut -> bool) option + Find: (LineOut -> bool) option + WorkingDirectory: string option + Environment: Map option + + Timeout: TimeSpan option + + ValidExitCodeClassifier: (int -> bool) option + + NoWrapInThread: bool option + SendControlCFirst: bool option + WaitForStreamReadersTimeout: TimeSpan option +} + +type ExecBuilder() = + + let startArgs (opts: ExecOptions) = + let startArguments = StartArguments(opts.Binary, opts.Arguments |> Option.defaultValue []) + opts.LineOutFilter |> Option.iter(fun f -> startArguments.LineOutFilter <- f) + opts.Environment |> Option.iter(fun e -> startArguments.Environment <- e) + opts.WorkingDirectory |> Option.iter(fun d -> startArguments.WorkingDirectory <- d) + opts.NoWrapInThread |> Option.iter(fun b -> startArguments.NoWrapInThread <- b) + opts.SendControlCFirst |> Option.iter(fun b -> startArguments.SendControlCFirst <- b) + opts.WaitForStreamReadersTimeout |> Option.iter(fun t -> startArguments.WaitForStreamReadersTimeout <- t) + startArguments + + let execArgs (opts: ExecOptions) = + let execArguments = ExecArguments(opts.Binary, opts.Arguments |> Option.defaultValue []) + opts.Environment |> Option.iter(fun e -> execArguments.Environment <- e) + opts.WorkingDirectory |> Option.iter(fun d -> execArguments.WorkingDirectory <- d) + opts.ValidExitCodeClassifier |> Option.iter(fun f -> execArguments.ValidExitCodeClassifier <- f) + execArguments + + member t.Yield _ = + { + Binary = ""; Arguments = None; Find = None; + LineOutFilter = None; WorkingDirectory = None; Environment = None + Timeout = None + ValidExitCodeClassifier = None; + NoWrapInThread = None; SendControlCFirst = None; WaitForStreamReadersTimeout = None; + } + + [] + member inline this.Binary(opts, binary) = + { opts with Binary = binary } + + [] + member inline this.Arguments(opts, [] args: string array) = + { opts with Arguments = Some (args |> List.ofArray) } + + [] + member inline this.Arguments(opts, args: string list) = + { opts with Arguments = Some args} + + [] + member inline this.WorkingDirectory(opts, workingDirectory: string) = + { opts with WorkingDirectory = Some workingDirectory } + + [] + member inline this.EnvironmentVariables(opts, env: Map) = + { opts with Environment = Some env } + + [] + member inline this.Timeout(opts, timeout) = + { opts with Timeout = Some timeout } + + [] + member inline this.WaitForStreamReadersTimeout(opts, timeout) = + { opts with WaitForStreamReadersTimeout = Some timeout } + + [] + member inline this.SendControlCFirst(opts, sendControlCFirst) = + { opts with SendControlCFirst = Some sendControlCFirst } + + [] + member inline this.NoWrapInThread(opts, threadWrap) = + { opts with NoWrapInThread = Some (not threadWrap) } + + [] + member inline this.FilterOutput(opts, find: LineOut -> bool) = + { opts with LineOutFilter = Some find } + + [] + member inline this.ValidExitCode(opts, exitCodeClassifier: int -> bool) = + { opts with ValidExitCodeClassifier = Some exitCodeClassifier } + + [] + member this.Find(opts, find: LineOut -> bool) = + let opts = { opts with Find = Some find } + let startArguments = startArgs opts + let result = Proc.Start(startArguments) + result.ConsoleOut + |> Seq.find find + + [] + member this.Filter(opts, find: LineOut -> bool) = + let opts = { opts with Find = Some find } + let startArguments = startArgs opts + let result = Proc.Start(startArguments) + result.ConsoleOut + |> Seq.filter find + |> List.ofSeq + + [] + member this.InvokeArgs(opts, [] args: string array) = + let opts = { opts with Arguments = Some (args |> List.ofArray) } + let execArgs = execArgs opts + Proc.Exec(execArgs) + + [] + member this.InvokeArgs(opts, args: string list) = + let opts = { opts with Arguments = Some args} + let execArgs = execArgs opts + Proc.Exec(execArgs) + + [] + member this.Invoke(opts) = + let execArgs = execArgs opts + Proc.Exec(execArgs) + +let exec = ExecBuilder() + + diff --git a/src/Proc.Fs/Proc.Fs.fsproj b/src/Proc.Fs/Proc.Fs.fsproj new file mode 100644 index 0000000..636eb98 --- /dev/null +++ b/src/Proc.Fs/Proc.Fs.fsproj @@ -0,0 +1,44 @@ + + + + Library + netstandard2.0 + + true + ..\..\build\keys\keypair.snk + + nuget-icon.png + MIT + https://github.com/nullean/proc + https://github.com/nullean/proc + https://github.com/nullean/proc/releases + + Proc.Fs + Proc.Fs - F# bindings for the easiest and full featured way to execute Processes in .NET + Dependency free reactive abstraction around Process, exposes handy static methods for the quick one-liners + + $(ProcCurrentVersion) + $(ProcCurrentVersion) + $(ProcCurrentAssemblyVersion) + $(ProcCurrentAssemblyFileVersion) + true + true + Latest + + + + + + + + + nuget-icon.png + True + nuget-icon.png + + + + + + + diff --git a/src/Proc/Proc.Exec.cs b/src/Proc/Proc.Exec.cs index c49ceaf..b0e5057 100644 --- a/src/Proc/Proc.Exec.cs +++ b/src/Proc/Proc.Exec.cs @@ -66,32 +66,28 @@ public static partial class Proc ? $"\"{arguments.Binary}\"" : $"\"{arguments.Binary} {args}\"{(pwd == null ? string.Empty : $" pwd: {pwd}")}"; - using (var process = new Process()) - { - process.StartInfo = info; - if (!process.Start()) throw new ProcExecException($"Failed to start {printBinary}"); - - var completedBeforeTimeout = process.WaitForExit((int)timeout.TotalMilliseconds); - if (!completedBeforeTimeout) - { - HardWaitForExit(process, TimeSpan.FromSeconds(1)); - throw new ProcExecException($"Timeout {timeout} occured while running {printBinary}"); - } - - var exitCode = process.ExitCode; - if (!arguments.ValidExitCodeClassifier(exitCode)) - throw new ProcExecException($"Process exited with '{exitCode}' {printBinary}") - { - ExitCode = exitCode - }; + using var process = new Process { StartInfo = info }; + if (!process.Start()) throw new ProcExecException($"Failed to start {printBinary}"); - return exitCode; + var completedBeforeTimeout = process.WaitForExit((int)timeout.TotalMilliseconds); + if (!completedBeforeTimeout) + { + HardWaitForExit(process, TimeSpan.FromSeconds(1)); + throw new ProcExecException($"Timeout {timeout} occured while running {printBinary}"); } + var exitCode = process.ExitCode; + if (!arguments.ValidExitCodeClassifier(exitCode)) + throw new ProcExecException($"Process exited with '{exitCode}' {printBinary}") + { + ExitCode = exitCode + }; + + return exitCode; } private static void HardWaitForExit(Process process, TimeSpan timeSpan) { - var task = Task.Run(() => process.WaitForExit()); + using var task = Task.Run(() => process.WaitForExit()); Task.WaitAny(task, Task.Delay(timeSpan)); } } diff --git a/src/Proc/Proc.Start.cs b/src/Proc/Proc.Start.cs index d922b4d..e148220 100644 --- a/src/Proc/Proc.Start.cs +++ b/src/Proc/Proc.Start.cs @@ -10,9 +10,9 @@ public static partial class Proc { /// /// Default timeout for all the process started through Proc.Start() or Proc.Exec(). - /// Defaults to 4 minutes. + /// Defaults to 10 minutes. /// - public static TimeSpan DefaultTimeout { get; } = TimeSpan.FromMinutes(4); + public static TimeSpan DefaultTimeout { get; } = TimeSpan.FromMinutes(10); /// Starts a program and captures the output while writing to the console in realtime during execution /// An object holding a list of console out lines, the exit code and whether the process completed @@ -83,27 +83,25 @@ public static ProcessCaptureResult Start(StartArguments arguments, TimeSpan time /// An object holding a list of console out lines, the exit code and whether the process completed public static ProcessCaptureResult Start(StartArguments arguments, TimeSpan timeout, IConsoleOutWriter consoleOutWriter, StartedHandler started) { - using (var composite = new CompositeDisposable()) - { - var process = new ObservableProcess(arguments); - if (started != null) process.ProcessStarted += started; - consoleOutWriter = consoleOutWriter ?? new ConsoleOutColorWriter(); + using var composite = new CompositeDisposable(); + var process = new ObservableProcess(arguments); + if (started != null) process.ProcessStarted += started; + consoleOutWriter = consoleOutWriter ?? new ConsoleOutColorWriter(); - Exception seenException = null; - var consoleOut = new List(); - composite.Add(process); - composite.Add(process.SubscribeLinesAndCharacters( - consoleOut.Add, - e => seenException = e, - consoleOutWriter.Write, - consoleOutWriter.Write - ) - ); + Exception seenException = null; + var consoleOut = new List(); + composite.Add(process); + composite.Add(process.SubscribeLinesAndCharacters( + consoleOut.Add, + e => seenException = e, + consoleOutWriter.Write, + consoleOutWriter.Write + ) + ); - var completed = process.WaitForCompletion(timeout); - if (seenException != null) ExceptionDispatchInfo.Capture(seenException).Throw(); - return new ProcessCaptureResult(completed, consoleOut, process.ExitCode); - } + var completed = process.WaitForCompletion(timeout); + if (seenException != null) ExceptionDispatchInfo.Capture(seenException).Throw(); + return new ProcessCaptureResult(completed, consoleOut, process.ExitCode); } } } diff --git a/src/Proc/Proc.csproj b/src/Proc/Proc.csproj index 505d023..b8817df 100644 --- a/src/Proc/Proc.csproj +++ b/src/Proc/Proc.csproj @@ -36,7 +36,7 @@ - + diff --git a/tests/Proc.Tests.Binary/Proc.Tests.Binary.csproj b/tests/Proc.Tests.Binary/Proc.Tests.Binary.csproj index bd3103f..aad40ae 100644 --- a/tests/Proc.Tests.Binary/Proc.Tests.Binary.csproj +++ b/tests/Proc.Tests.Binary/Proc.Tests.Binary.csproj @@ -1,7 +1,7 @@ Exe - net5.0 + net8.0 Proc.Tests.Binary Proc.Tests.Binary CS1701,CS1591 diff --git a/tests/Proc.Tests/Proc.Tests.csproj b/tests/Proc.Tests/Proc.Tests.csproj index edea5c7..1bd273d 100644 --- a/tests/Proc.Tests/Proc.Tests.csproj +++ b/tests/Proc.Tests/Proc.Tests.csproj @@ -1,6 +1,6 @@  - net5.0 + net8.0 Proc.Tests ProcNet.Tests false diff --git a/tests/Proc.Tests/TestsBase.cs b/tests/Proc.Tests/TestsBase.cs index 914b55e..bbc5a4d 100644 --- a/tests/Proc.Tests/TestsBase.cs +++ b/tests/Proc.Tests/TestsBase.cs @@ -33,7 +33,7 @@ protected static StartArguments TestCaseArguments(string testcase) => private static string GetDll() { - var dll = Path.Combine("bin", GetRunningConfiguration(), "net5.0", _procTestBinary + ".dll"); + var dll = Path.Combine("bin", GetRunningConfiguration(), "net8.0", _procTestBinary + ".dll"); var fullPath = Path.Combine(GetWorkingDir(), dll); if (!File.Exists(fullPath)) throw new Exception($"Can not find {fullPath}");