anchor.diff:          logerror:(string->string->unit)
               -> ResolvedFile[]
   
  -let SimplisticResolver =
  +let SimulatedMSBuildResolver =
       { new Resolver with 
           member __.HighestInstalledNetFrameworkVersion() = "v4.5"
           member __.DotNetFrameworkReferenceAssembliesRootDirectory = 
  
positive.code:                 let qual = if isFileName then r else try AssemblyName(r).Name + ".dll"  with _ -> r + ".dll"
  
                  for searchPath in searchPaths do 
                      if not found then 
                          let trialPath = Path.Combine(searchPath,qual)
                          if FileSystem.SafeExists(trialPath) then 
                              success trialPath
  
                  //if not found then 
                  //    let ass = try Some (Assembly.Load(r)) with _ -> None
                  //    match ass with 
                  //    | Some ass -> success ass.Location 
                  //    | None -> ()
                with e -> logWarning "SR001" (e.ToString())
              results.ToArray() }
  
  #if INTERACTIVE
  SimplisticResolver.DotNetFrameworkReferenceAssembliesRootDirectory
  SimplisticResolver.HighestInstalledNetFrameworkVersion()
  
  let fscoreDir = 
      if System.Environment.OSVersion.Platform = System.PlatformID.Win32NT then // file references only valid on Windows 
  
negative.code:         System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()
  
  let resolve s = 
      SimulatedMSBuildResolver.Resolve(ResolutionEnvironment.CompileTimeLike,[| for a in s -> (a, "") |],"v4.5.1", [SimulatedMSBuildResolver.DotNetFrameworkReferenceAssembliesRootDirectory + @"\v4.5.1" ],"", "", fscoreDir,[],__SOURCE_DIRECTORY__,ignore, (fun _ _ -> ()), (fun _ _-> ()))
  
  resolve ["System"; "mscorlib"; "mscorlib.dll"; "FSharp.Core"; "FSharp.Core.dll"; "Microsoft.SqlServer.Dmf.dll"; "Microsoft.SqlServer.Dmf"  ]
  
  resolve [ "FSharp.Core, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" ]
  
  resolve [                 "EventViewer, Version=6.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" ]
  #endif
  
  let GetDefaultResolver(msbuildEnabled: bool, msbuildVersion: string option) = 
      let msbuildEnabled = msbuildEnabled && false
      let msbuildVersion = defaultArg msbuildVersion  "12"
      let tryMSBuild v = 
          // Detect if MSBuild is on the machine, if so use the resolver from there
          let mb = try Assembly.Load(sprintf "Microsoft.Build.Framework, Version=%s.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" v) |> Option.ofObj with _ -> None
          let ass = mb |> Option.bind (fun _ -> try Assembly.Load(sprintf "FSharp.Compiler.Service.MSBuild.v%s" v) |> Option.ofObj with _ -> None)
          let ty = ass |> Option.bind (fun ass -> ass.GetType("Microsoft.FSharp.Compiler.MSBuildReferenceResolver") |> Option.ofObj)
          let obj = ty |> Option.bind (fun ty -> ty.InvokeMember("get_Resolver",BindingFlags.Static ||| BindingFlags.Public ||| BindingFlags.InvokeMethod ||| BindingFlags.NonPublic, null, null, [| |]) |> Option.ofObj)
          let resolver = obj |> Option.bind (fun obj -> match obj with :? Resolver as r -> Some r | _ -> None)
          resolver
      match (if msbuildEnabled then tryMSBuild msbuildVersion else None) with 
      | Some r -> r
      | None -> 
      //match tryMSBuild "15" with 
  