Skip to content

Commit

Permalink
Add GAC locations to assembly search paths
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveGilham committed Apr 10, 2024
1 parent e073204 commit e0a2df7
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion AltCover.Engine/CecilEx.fs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,14 @@ type internal AssemblyResolver() as self =
"dotnet|shared"
.Replace('|', Path.DirectorySeparatorChar)

let wingac =
"Microsoft.NET|assembly"
.Replace('|', Path.DirectorySeparatorChar)

let monogac =
"lib|mono|gac"
.Replace('|', Path.DirectorySeparatorChar)

let sources =
[ AssemblyConstants.packageEnv
[ Environment.GetEnvironmentVariable "ProgramFiles"
Expand All @@ -139,7 +147,14 @@ type internal AssemblyResolver() as self =
Some <| Path.Combine(shareLocal, dotnetShared)
AssemblyConstants.dotnetDir
|> Option.map (fun p -> Path.Combine(p, "shared"))
Some AssemblyConstants.nugetCache ]
Some AssemblyConstants.nugetCache
Some <| Path.Combine("usr", monogac)
Environment.GetEnvironmentVariable "WinDir"
|> Option.ofObj
|> Option.map (fun p -> Path.Combine(p, wingac))
Environment.GetEnvironmentVariable "MONO_GAC_PREFIX"
|> Option.ofObj
|> Option.map (fun p -> Path.Combine(p, monogac)) ]
|> List.choose id ]
|> List.concat
|> List.filter Directory.Exists
Expand Down

0 comments on commit e0a2df7

Please sign in to comment.