public static Result GetPathToCoreClrChecked()

in src/dotnet/ReSharperPlugin.DotNetDisassembler/JitDisasm/JitPathUtils.cs [38:62]


    public static Result<string> GetPathToCoreClrChecked(JitDisasmConfiguration configuration) =>
        GetPathToCoreClrChecked(configuration.PathToLocalCoreClr, configuration.Arch, configuration.CrossgenIsSelected);
    
    public static Result<string> GetPathToCoreClrChecked(string pathToLocalCoreClr, string arch,
        bool isCrossgenSelected = false)
    {
        var clrCheckedFilesDir = FindJitDirectory(pathToLocalCoreClr, arch);
        if (string.IsNullOrWhiteSpace(clrCheckedFilesDir))
        {
            var msg =
                $"""
                 Path to a local dotnet/runtime repository is either not set or it's not built for {arch} arch yet
                                 {(isCrossgenSelected
                                     ? "\n(When you use crossgen and target e.g. arm64 you need coreclr built for that arch)"
                                     : "")}
                                 \nPlease clone it and build it in `Checked` mode, e.g.:\n\n
                                 git clone git@github.com:dotnet/runtime.git\n
                                 cd runtime\n
                                 build.cmd Clr+Clr.Aot+Libs -c Release -rc Checked -a {arch}\n\n
                 """;
            return Result.Fail(msg);
        }

        return Result.Success(clrCheckedFilesDir);
    }