anchor.diff:                  PF + @"\Reference Assemblies\Microsoft\Framework\.NETFramework"
               else
                   ""
  +#endif
   
           member __.Resolve(resolutionEnvironment, references, targetFrameworkVersion, targetFrameworkDirectories, targetProcessorArchitecture,                
                               outputDirectory, fsharpCoreDir, explicitIncludeDirs, implicitIncludeDir, logMessage, logWarning, logError) =
   
  +#if !RESHAPED_MSBUILD
               let registrySearchPaths() = 
                 [ let registryKey = @"Software\Microsoft\.NetFramework";
                   use key = Registry.LocalMachine.OpenSubKey(registryKey)
  
positive.code:                             success r
                  with e -> logWarning "SR001" (e.ToString())
  
                  // For this one we need to get the version search exactly right, without doing a load
                  try 
                      if not found && r.StartsWith("FSharp.Core, Version=")  && Environment.OSVersion.Platform = PlatformID.Win32NT then 
  
negative.code:                             success trialPath
                    with e -> logWarning "SR001" (e.ToString())
  
  #if !RESHAPED_MSBUILD
                  try 
                      // Seach the GAC on Windows
                      if not found && not isFileName && Environment.OSVersion.Platform = PlatformID.Win32NT then 
                          let n = AssemblyName(r)
                          let netfx = System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()
                          let gac = Path.Combine(Path.GetDirectoryName(Path.GetDirectoryName(netfx.TrimEnd('\\'))),"assembly")
                          match n.Version, n.GetPublicKeyToken()  with 
                          | null, _ | _,null -> 
                              let options = 
                                  [ for gacdir in Directory.EnumerateDirectories(gac) do 
                                      let assdir = Path.Combine(gacdir,n.Name)
                                      if Directory.Exists(assdir) then 
                                          for tdir in Directory.EnumerateDirectories(assdir) do 
                                              let trialPath = Path.Combine(tdir,qual)
                                              if FileSystem.SafeExists(trialPath) then 
                                                  yield trialPath ]
                              //printfn "sorting GAC paths: %A" options
                              options 
                              |> List.sort // puts latest version last
                              |> List.tryLast
                              |> function None -> () | Some p -> success p
  
                          | v,tok -> 
                              for gacdir in Directory.EnumerateDirectories(gac) do 
                                  //printfn "searching GAC directory: %s" gacdir
                                  let assdir = Path.Combine(gacdir,n.Name)
                                  if Directory.Exists(assdir) then 
                                      //printfn "searching GAC directory: %s" assdir
  
                                      let tokText = String.concat "" [| for b in tok -> sprintf "%02x" b |]
                                      let verdir = Path.Combine(assdir,"v4.0_"+v.ToString()+"__"+tokText)
                                      //printfn "searching GAC directory: %s" verdir
  
                                      if Directory.Exists(verdir) then 
                                          let trialPath = Path.Combine(verdir,qual)
                                          //printfn "searching GAC: %s" trialPath
                                          if FileSystem.SafeExists(trialPath) then 
                                              success trialPath
                  with e -> logWarning "SR001" (e.ToString())
  #endif
  
              results.ToArray() }
  
  let GetDefaultResolver(msbuildEnabled: bool, msbuildVersion: string option) = 
  