Skip to content

Commit

Permalink
Added path for when Mono, untested.
Browse files Browse the repository at this point in the history
  • Loading branch information
Verdonck authored and Verdonck committed Feb 12, 2019
1 parent c2a45b8 commit f227105
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/dotnet/Fable.Compiler/CLI/ProjectCracker.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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) =
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit f227105

Please sign in to comment.