Skip to content

Commit 62e9bdf

Browse files
authored
restore coreclr.dll from a NuGet package (#4005)
1 parent ae55828 commit 62e9bdf

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

tests/fsharp/packages.config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
<package id="NUnit3TestAdapter" version="3.7.0" targetFramework="net45" />
44
<package id="runtime.win-x64.Microsoft.NETCore.ILDAsm" version="2.0.3" />
55
<package id="runtime.win-x86.Microsoft.NETCore.ILDAsm" version="2.0.3" />
6+
<package id="runtime.win-x64.Microsoft.NETCore.Runtime.CoreCLR" version="2.0.3" />
7+
<package id="runtime.win-x86.Microsoft.NETCore.Runtime.CoreCLR" version="2.0.3" />
68
<package id="System.Collections.Immutable" version="1.3.1" targetFramework="net45" />
79
<package id="System.Reflection.Metadata" version="1.4.2" targetFramework="net45" />
810
</packages>

tests/fsharp/test-framework.fs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ let config configurationName envVars =
178178
let architectureMoniker = if Is64BitOperatingSystem then "x64" else "x86"
179179
let CSC = requireFile (CORDIR ++ "csc.exe")
180180
let ILDASM = requireFile (packagesDir ++ ("runtime.win-" + architectureMoniker + ".Microsoft.NETCore.ILDAsm.2.0.3") ++ "runtimes" ++ ("win-" + architectureMoniker) ++ "native" ++ "ildasm.exe")
181+
let coreclrdll = requireFile (packagesDir ++ ("runtime.win-" + architectureMoniker + ".Microsoft.NETCore.Runtime.CoreCLR.2.0.3") ++ "runtimes" ++ ("win-" + architectureMoniker) ++ "native" ++ "coreclr.dll")
181182
let PEVERIFY = requireFile (CORSDK ++ "peverify.exe")
182183
let FSI_FOR_SCRIPTS =
183184
match envVars |> Map.tryFind "_fsiexe" with
@@ -191,9 +192,8 @@ let config configurationName envVars =
191192
| _ -> failwithf "Found more than one 'FSharp.Compiler.Tools' inside '%s', please clean up." packagesDir
192193
let toolsDir = SCRIPT_ROOT ++ ".." ++ ".." ++ "Tools"
193194
let dotNetExe = toolsDir ++ "dotnetcli" ++ "dotnet.exe"
194-
// ildasm requires coreclr.dll to run which has already been restored to the tools directory
195-
let coreclrSource = toolsDir ++ "dotnet20" ++ "shared" ++ "Microsoft.NETCore.App" ++ "2.0.0" ++ "coreclr.dll"
196-
File.Copy(coreclrSource, Path.GetDirectoryName(ILDASM) ++ "coreclr.dll", overwrite=true)
195+
// ildasm requires coreclr.dll to run which has already been restored to the packages directory
196+
File.Copy(coreclrdll, Path.GetDirectoryName(ILDASM) ++ "coreclr.dll", overwrite=true)
197197

198198
#if !FSHARP_SUITE_DRIVES_CORECLR_TESTS
199199
let FSI = requireFile (FSCBinPath ++ "fsi.exe")

0 commit comments

Comments
 (0)