Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
Another fix to last checkin
Browse files Browse the repository at this point in the history
  • Loading branch information
funnelweb committed Dec 9, 2012
1 parent 41aa28c commit c60fda2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/fsharp/ReferenceResolution.fs
Original file line number Diff line number Diff line change
Expand Up @@ -206,17 +206,17 @@ module internal MSBuildResolver =
#if BUILDING_WITH_LKG
ignore targetProcessorArchitecture
#else

let targetedRuntimeVersionValue = typeof<obj>.Assembly.ImageRuntimeVersion
#if CROSS_PLATFORM_COMPILER
// The properties TargetedRuntimeVersion and CopyLocalDependenciesWhenParentReferenceInGac
// are not available to the cross-platform compiler since they are Windows only (not defined in the Mono
// 4.0 XBuild support). So we only set them if available (to avoid a compile-time dependency).
let runningOnMono = try System.Type.GetType("Mono.Runtime") <> null with e-> false
if not runningOnMono then
typeof<ResolveAssemblyReference>.InvokeMember("TargetedRuntimeVersion",(BindingFlags.Instance ||| BindingFlags.SetProperty ||| BindingFlags.Public),null,rar,[| box trv |]) |> ignore
typeof<ResolveAssemblyReference>.InvokeMember("TargetedRuntimeVersion",(BindingFlags.Instance ||| BindingFlags.SetProperty ||| BindingFlags.Public),null,rar,[| box targetedRuntimeVersionValue |]) |> ignore
typeof<ResolveAssemblyReference>.InvokeMember("CopyLocalDependenciesWhenParentReferenceInGac",(BindingFlags.Instance ||| BindingFlags.SetProperty ||| BindingFlags.Public),null,rar,[| box true |]) |> ignore
#else
rar.TargetedRuntimeVersion <- typeof<obj>.Assembly.ImageRuntimeVersion
rar.TargetedRuntimeVersion <- targetedRuntimeVersionValue
rar.CopyLocalDependenciesWhenParentReferenceInGac <- true
#endif
#endif
Expand Down

0 comments on commit c60fda2

Please sign in to comment.