Jetbrains家的KeyGen网上有很多,直接百度一下就能搜出来。
主要是ReSharper有联网验证,而且是.NET平台的软件,不能像Java一样用--javaagent直接进行注入。
这里给一个用Visual Studio拓展来解决的思路。

using HarmonyLib;
using System;

namespace ReSharperCrack
{
    [HarmonyPatch]
    internal static class Patches
    {
        static Patches()
        {
            try
            {
                var harmonyVersion = typeof(Harmony).Assembly.GetName().Version?.ToString() ?? "unknown";
                Logger.Log($"Patch loaded. Start. Harmony={harmonyVersion}, AppDomain={AppDomain.CurrentDomain.FriendlyName}");
            }
            catch (Exception ex)
            {
                Logger.Log($"Patch static ctor exception: {ex}");
            }
        }

        [HarmonyPatch("JetBrains.Application.License2.UserLicenses.UserLicenseViewSubmodel", "AddLicense")]
        [HarmonyPrefix]
        internal static bool AddLicense_Prefix(ref bool validateLicenseKey)
        {
            try
            {
                Logger.Log($"AddLicense_Prefix called. validateLicenseKey(before)={validateLicenseKey}");
                validateLicenseKey = false;
                Logger.Log($"AddLicense_Prefix finished. validateLicenseKey(after)={validateLicenseKey}");
                return true;
            }
            catch (Exception ex)
            {
                Logger.Log($"AddLicense_Prefix exception: {ex}");
                // be conservative: let original run if our prefix fails
                return true;
            }
        }

        [HarmonyPatch("JetBrains.Application.License2.NewLicenses.UserLicenseService", "VerifyCertificate")]
        [HarmonyPostfix]
        internal static void VerifyCertificate_Postfix(ref object __result)
        {
            try
            {
                Logger.Log($"VerifyCertificate_Postfix called. __result(before)={(__result == null ? "<null>" : __result + " (" + __result.GetType().FullName + ")")}");

                if ((int)__result != 0)
                {
                    __result = 0;
                }

                Logger.Log($"VerifyCertificate_Postfix finished. __result(after)={(__result == null ? "<null>" : __result + " (" + __result.GetType().FullName + ")")}");
            }
            catch (Exception ex)
            {
                Logger.Log($"VerifyCertificate_Postfix exception: {ex}");
            }
        }
    }
}

以及入口类:

/*...*/
[PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)]
[Guid(ReSharperCrackPackage.PackageGuidString)]
[ProvideAutoLoad(UIContextGuids80.NoSolution, PackageAutoLoadFlags.BackgroundLoad)]
public sealed class ReSharperCrackPackage : AsyncPackage
{
    protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress<ServiceProgressData> progress)
    {
        // 在这里加载LibHarmony的Hook
    }
}
/*...*/

编译成vsix拓展,装载在Visual Studio上。

接着,使用License Key激活就可以了。

ReSharper稳定破解

ReSharper稳定破解