Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
bad image
  • Loading branch information
KevinRansom committed Dec 16, 2020
commit 80e386b0ce38f7be04eb9b50bff58441677e9706
12 changes: 10 additions & 2 deletions src/buildtools/AssemblyCheck/AssemblyCheck.fs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ module AssemblyCheck =
let excludedAssemblies =
[ ] |> Set.ofList

let maybeNativeExe =
[ "fsi.exe"
"fsc.exe" ] |> Set.ofList

let fsharpAssemblies =
[ "FSharp*.dll"
"fsc.exe"
Expand All @@ -63,8 +67,12 @@ module AssemblyCheck =
let failedVersionCheck =
fsharpAssemblies
|> List.filter (fun a ->
let assemblyVersion = AssemblyName.GetAssemblyName(a).Version
assemblyVersion = versionZero || assemblyVersion = versionOne)
try
let assemblyVersion = AssemblyName.GetAssemblyName(a).Version
assemblyVersion = versionZero || assemblyVersion = versionOne
with | ?: System.BadImageFormatException ->
// fsc.exe and fsi.exe are il on the desktop and native on the coreclr
Set.contains (Path.GetFileName(a)) maybeNativeExe))

if failedVersionCheck.Length > 0 then
printfn "The following assemblies had a version of %A or %A" versionZero versionOne
Expand Down
4 changes: 4 additions & 0 deletions tests/FSharp.Test.Utilities/TestFramework.fs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,11 @@ let config configurationName envVars =
if File.Exists(repoLocalDotnetPath) then repoLocalDotnetPath
else DOTNET_EXE

#if !NETCOREAPP
let FSI_PATH = ("fsi" ++ configurationName ++ fsiArchitecture ++ "fsi.exe")
#else
let FSI_PATH = ("fsi" ++ configurationName ++ fsiArchitecture ++ "fsi.dll")
#endif
let FSI_FOR_SCRIPTS = requireArtifact FSI_PATH
let FSI = requireArtifact FSI_PATH
#if !NETCOREAPP
Expand Down