@@ -206,17 +206,17 @@ module internal MSBuildResolver =
206206#if BUILDING_ WITH_ LKG
207207 ignore targetProcessorArchitecture
208208#else
209-
209+ let targetedRuntimeVersionValue = typeof < obj >. Assembly.ImageRuntimeVersion
210210#if CROSS_ PLATFORM_ COMPILER
211211// The properties TargetedRuntimeVersion and CopyLocalDependenciesWhenParentReferenceInGac
212212// are not available to the cross-platform compiler since they are Windows only (not defined in the Mono
213213// 4.0 XBuild support). So we only set them if available (to avoid a compile-time dependency).
214214let runningOnMono = try System.Type.GetType( " Mono.Runtime" ) <> null with e-> false
215215if not runningOnMonothen
216- typeof< ResolveAssemblyReference>. InvokeMember( " TargetedRuntimeVersion" ,( BindingFlags.Instance||| BindingFlags.SetProperty||| BindingFlags.Public), null , rar,[| boxtrv |]) |> ignore
216+ typeof< ResolveAssemblyReference>. InvokeMember( " TargetedRuntimeVersion" ,( BindingFlags.Instance||| BindingFlags.SetProperty||| BindingFlags.Public), null , rar,[| boxtargetedRuntimeVersionValue |]) |> ignore
217217 typeof< ResolveAssemblyReference>. InvokeMember( " CopyLocalDependenciesWhenParentReferenceInGac" ,( BindingFlags.Instance||| BindingFlags.SetProperty||| BindingFlags.Public), null , rar,[| boxtrue |]) |> ignore
218218#else
219- rar.TargetedRuntimeVersion<- typeof < obj >. Assembly.ImageRuntimeVersion
219+ rar.TargetedRuntimeVersion<- targetedRuntimeVersionValue
220220 rar.CopyLocalDependenciesWhenParentReferenceInGac<- true
221221#endif
222222#endif