anchor.diff:              // during compilation. So we recover the CompilationThreadToken here.
               let ctok = AssumeCompilationThreadWithoutEvidence ()
               ResolveAssembly (ctok, rangeStdin, tcConfigB, tcImports, fsiDynamicCompiler, fsiConsoleOutput, args.Name))
  -        
  +
           AppDomain.CurrentDomain.add_AssemblyResolve(handler)
   
           { new System.IDisposable  with 
                member x.Dispose() = AppDomain.CurrentDomain.remove_AssemblyResolve(handler) }
  -#endif
   
   //----------------------------------------------------------------------------
   // Reading stdin 
  
positive.code:                    | Some(assembly) -> OkResult([],Choice2Of2 assembly)
                     | None -> 
  #endif
                     
                     // As a last resort, try to find the reference without an extension
                     match tcImports.TryFindExistingFullyQualifiedPathByExactAssemblyRef(ctok, ILAssemblyRef.Create(simpleAssemName,None,None,false,None,None)) with
                     | Some(resolvedPath) -> 
                         OkResult([],Choice1Of2 resolvedPath)
                     | None -> 
                     
                     ErrorResult([],Failure (FSIstrings.SR.fsiFailedToResolveAssembly(simpleAssemName)))
                             
                 match overallSearchResult with 
                 | ErrorResult _ -> null
                 | OkResult _ -> 
  
negative.code:                // Otherwise continue
                 let assemblyReferenceTextDll = (simpleAssemName + ".dll") 
                 let assemblyReferenceTextExe = (simpleAssemName + ".exe") 
                 let overallSearchResult =
  
                     // OK, try to resolve as an existing DLL in the resolved reference set.  This does unification by assembly name
                     // once an assembly has been referenced.
  