diff --git a/src/dotnet/Fable.Compiler/CLI/ProjectCracker.fs b/src/dotnet/Fable.Compiler/CLI/ProjectCracker.fs index d2b4b841e..7a293467e 100644 --- a/src/dotnet/Fable.Compiler/CLI/ProjectCracker.fs +++ b/src/dotnet/Fable.Compiler/CLI/ProjectCracker.fs @@ -11,6 +11,7 @@ open Microsoft.FSharp.Compiler.SourceCodeServices open Fable open Dotnet.ProjInfo.Workspace open Dotnet.ProjInfo.Workspace.FCS +open System.Runtime.InteropServices let isSystemPackage (pkgName: string) = @@ -322,7 +323,11 @@ let getCrackedProjects (checker: FSharpChecker) (projFile: string) = |> fun dllRx -> Array.fold (fun dllRs rf -> if not (List.exists (fun r -> Path.GetFileNameWithoutExtension(r) = rf) dllRs) then - let dllPath = System.IO.Path.Combine(@"C:\Windows\Microsoft.NET\Framework64\v4.0.30319", sprintf "%s.dll" rf) // TODO: get path to full framework or mono + let dllPath = + if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) then + System.IO.Path.Combine("/usr/lib/mono/4.7.1-api/Facades", sprintf "%s.dll" rf) + else + System.IO.Path.Combine(@"C:\Windows\Microsoft.NET\Framework64\v4.0.30319", sprintf "%s.dll" rf) // TODO: get path to full framework or mono if System.IO.File.Exists(dllPath) |> not then dllRs // System.Reflection.Metadata & System.Reflection.TypeExtensions don't exist in full framework. // I think these Reflection APIs are in System.Reflection.dll and are found at runtime.