anchor.diff:  let getProjectOptionsFromProjectFile =
       let mutable manager = None
   
  -    let compileFilesToAbsolutePath projDir (f: string) =
  -        if f.EndsWith(".fs") || f.EndsWith(".fsi") then
  -            if Path.IsPathRooted f then f else Path.Combine(projDir, f)
  -        else
  -            f
  -    fun (opts: CrackerOptions) (projFile: string) ->
  +    let tryGetResult (isMain: bool) (opts: CrackerOptions) (manager: AnalyzerManager) (maybeCsprojFile: string) =
  +        if isMain && not opts.NoRestore then
  +            Process.runSync (IO.Path.GetDirectoryName opts.ProjFile) "dotnet" [
  +                "restore"
  +                IO.Path.GetFileName maybeCsprojFile
  +                // $"-p:TargetFramework={opts.TargetFramework}"
  +                for constant in opts.FableOptions.Define do
  +                    $"-p:{constant}=true"
  +            ] |> ignore
  +
  +        let analyzer = manager.GetProject(maybeCsprojFile)
  +        let env = analyzer.EnvironmentFactory.GetBuildEnvironment(Environment.EnvironmentOptions(DesignTime=true,Restore=false))
  +        // If the project targets multiple frameworks, multiple results will be returned
  +        // For now we just take the first one with non-empty command
  +        let results = analyzer.Build(env)
  +        results
  +        |> Seq.tryFind (fun r -> String.IsNullOrEmpty(r.Command) |> not)
  +
  +    fun (isMain: bool) (opts: CrackerOptions) (projFile: string) ->
           let manager =
               match manager with
               | Some m -> m
  
positive.code:             | _ -> "fable-library", "fable-library" + "." + Literals.VERSION
  
          let fableLibrarySource =
              AppContext.BaseDirectory
              |> File.tryFindNonEmptyDirectoryUpwards {| matches = [buildDir; "build/" + buildDir]; exclude = ["src"] |}
              |> Option.defaultWith (fun () -> Fable.FableError "Cannot find fable-library" |> raise)
  
          let fableLibraryTarget = IO.Path.Combine(opts.FableModulesDir, libDir)
          // Always overwrite fable-library in case it has been updated, see #3208
  
negative.code:                 None
              else
                  try
                      IO.File.Copy(projFile, csprojFile)
                      tryGetResult isMain opts manager csprojFile
                      |> Option.map (fun (r: IAnalyzerResult) ->
                          // Careful, options for .csproj start with / but so do root paths in unix
                          let reg = System.Text.RegularExpressions.Regex(@"^\/[^\/]+?(:?:|$)")
                          let comArgs =
  