anchor.diff:                  None
               else
                   try
  -                    System.IO.File.Copy(projFile, csprojFile)
  -                    csprojFile
  -                    |> tryGetResult (fun r ->
  +                    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 =
  
positive.code:                 manager <- Some m
                  m
  
          let tryGetResult (getCompilerArgs: IAnalyzerResult -> string[]) (maybeCsprojFile: string) =
              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)
              |> Option.map (fun result ->
                  {| CompilerArguments = getCompilerArgs result
                     ProjectReferences = result.ProjectReferences
                     TargetFramework = result.TargetFramework
                     Properties = result.Properties |})
  
          // Because Buildalyzer works better with .csproj, we first "dress up" the project as if it were a C# one
          // and try to adapt the results. If it doesn't work, we try again to analyze the .fsproj directly
          let csprojResult =
  
negative.code:             | _ -> "fable-library", "fable-library" + "." + Literals.VERSION
  
          let fableLibrarySource =
              let baseDir = AppContext.BaseDirectory
              baseDir
              |> File.tryFindNonEmptyDirectoryUpwards {| matches = [buildDir; "build/" + buildDir]; exclude = ["src"] |}
              |> Option.defaultWith (fun () -> Fable.FableError $"Cannot find [build/]{buildDir} from {baseDir}" |> raise)
  
          let fableLibraryTarget = IO.Path.Combine(opts.FableModulesDir, libDir)
          // Always overwrite fable-library in case it has been updated, see #3208
  