Expand test harness (#6)

This commit is contained in:
Patrick Stevens
2025-05-16 21:18:32 +01:00
committed by GitHub
parent 3415b7a73d
commit d85bfeb168
12 changed files with 95 additions and 18 deletions

View File

@@ -1,6 +1,5 @@
namespace WoofWare.PawPrint
open System
open System.Collections.Immutable
open System.IO
open Microsoft.Extensions.Logging
@@ -21,11 +20,7 @@ module Program =
match argv |> Array.toList with
| dllPath :: args ->
let dotnetRuntimes =
// TODO: work out which runtime it expects to use, parsing the runtimeconfig etc and using DotnetRuntimeLocator. For now we assume we're self-contained.
// DotnetEnvironmentInfo.Get().Frameworks
// |> Seq.map (fun fi -> Path.Combine (fi.Path, fi.Version.ToString ()))
// |> ImmutableArray.CreateRange
ImmutableArray.Create (FileInfo(dllPath).Directory.FullName)
DotnetRuntime.SelectForDll dllPath |> ImmutableArray.CreateRange
use fileStream = new FileStream (dllPath, FileMode.Open, FileAccess.Read)

View File

@@ -15,7 +15,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="9.0.2" />
<PackageReference Include="WoofWare.DotnetRuntimeLocator" Version="0.1.11" />
<PackageReference Include="WoofWare.DotnetRuntimeLocator" Version="0.3.2" />
</ItemGroup>
</Project>