ppy/osu · error · RulesetLoadException

Ruleset could not be loaded (Ruleset not available)

Error message

Ruleset could not be loaded (Ruleset not available)

What it means

Thrown as RulesetLoadException by RulesetInfo.CreateInstance when Available is false. A ruleset is marked unavailable during scanning if its assembly failed to load or its version is incompatible with the current game, so CreateInstance refuses to proceed.

Source

Thrown at osu.Game/Rulesets/RulesetInfo.cs:100

            return hashCode.ToHashCode();
        }

        public override string ToString() => Name;

        public RulesetInfo Clone() => new RulesetInfo
        {
            OnlineID = OnlineID,
            Name = Name,
            ShortName = ShortName,
            InstantiationInfo = InstantiationInfo,
            Available = Available,
            LastAppliedDifficultyVersion = LastAppliedDifficultyVersion,
        };

        public Ruleset CreateInstance()
        {
            if (!Available)
                throw new RulesetLoadException(@"Ruleset not available");

            var type = Type.GetType(InstantiationInfo);

            if (type == null)
                throw new RulesetLoadException(@"Type lookup failure");

            var ruleset = Activator.CreateInstance(type) as Ruleset;

            if (ruleset == null)
                throw new RulesetLoadException(@"Instantiation failure");

            // overwrite the pre-populated RulesetInfo with a potentially database attached copy.
            // TODO: figure if we still want/need this after switching to realm.
            // ruleset.RulesetInfo = this;

            return ruleset;
        }
    }

View on GitHub (pinned to d9c73e12ad)

Solutions

  1. Update or remove the incompatible ruleset DLL so Available becomes true after rescan.
  2. Check RulesetInfo.Available before calling CreateInstance and skip if false.
  3. Consult the ruleset's release notes for a compatible version.

Example fix

// before
var instance = rulesetInfo.CreateInstance();

// after
if (!rulesetInfo.Available) return null;
var instance = rulesetInfo.CreateInstance();
Defensive patterns

Strategy: validation

Validate before calling

if (!rulesetInfo.Available) return null; // skip unavailable rulesets
var instance = rulesetInfo.CreateInstance();

Type guard

bool IsInstantiable(RulesetInfo r) => r.Available;

Try / catch

try { var instance = rulesetInfo.CreateInstance(); }
catch (RulesetLoadException) { /* ruleset unavailable: skip */ }

Prevention

When it happens

Trigger: Calling CreateInstance() on a RulesetInfo whose Available flag is false (set during ruleset assembly scanning on startup).

Common situations: A ruleset DLL is present but its API version does not match the game (incompatible ruleset version); the assembly threw during load; ruleset explicitly disabled.

Related errors


AI-assisted analysis of ppy/osu@d9c73e12ad (2026-08-13). Data as JSON: /api/errors/2d8abbc40e7e619f. Report an issue: GitHub.