{"record":{"id":"2d8abbc40e7e619f","repo":"ppy/osu","slug":"ruleset-could-not-be-loaded-ruleset-not-available","errorCode":null,"errorMessage":"Ruleset could not be loaded (Ruleset not available)","messagePattern":"Ruleset could not be loaded \\(Ruleset not available\\)","errorType":"exception","errorClass":"RulesetLoadException","httpStatus":null,"severity":"error","filePath":"osu.Game/Rulesets/RulesetInfo.cs","lineNumber":100,"sourceCode":"            return hashCode.ToHashCode();\r\n        }\r\n\r\n        public override string ToString() => Name;\r\n\r\n        public RulesetInfo Clone() => new RulesetInfo\r\n        {\r\n            OnlineID = OnlineID,\r\n            Name = Name,\r\n            ShortName = ShortName,\r\n            InstantiationInfo = InstantiationInfo,\r\n            Available = Available,\r\n            LastAppliedDifficultyVersion = LastAppliedDifficultyVersion,\r\n        };\r\n\r\n        public Ruleset CreateInstance()\r\n        {\r\n            if (!Available)\r\n                throw new RulesetLoadException(@\"Ruleset not available\");\r\n\r\n            var type = Type.GetType(InstantiationInfo);\r\n\r\n            if (type == null)\r\n                throw new RulesetLoadException(@\"Type lookup failure\");\r\n\r\n            var ruleset = Activator.CreateInstance(type) as Ruleset;\r\n\r\n            if (ruleset == null)\r\n                throw new RulesetLoadException(@\"Instantiation failure\");\r\n\r\n            // overwrite the pre-populated RulesetInfo with a potentially database attached copy.\r\n            // TODO: figure if we still want/need this after switching to realm.\r\n            // ruleset.RulesetInfo = this;\r\n\r\n            return ruleset;\r\n        }\r\n    }\r","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/ppy/osu/blob/d9c73e12adff2feaae4a3e158d36fe5883faf6ca/osu.Game/Rulesets/RulesetInfo.cs#L82-L118","documentation":"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.","triggerScenarios":"Calling CreateInstance() on a RulesetInfo whose Available flag is false (set during ruleset assembly scanning on startup).","commonSituations":"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.","solutions":["Update or remove the incompatible ruleset DLL so Available becomes true after rescan.","Check RulesetInfo.Available before calling CreateInstance and skip if false.","Consult the ruleset's release notes for a compatible version."],"exampleFix":"// before\nvar instance = rulesetInfo.CreateInstance();\n\n// after\nif (!rulesetInfo.Available) return null;\nvar instance = rulesetInfo.CreateInstance();","handlingStrategy":"validation","validationCode":"if (!rulesetInfo.Available) return null; // skip unavailable rulesets\nvar instance = rulesetInfo.CreateInstance();","typeGuard":"bool IsInstantiable(RulesetInfo r) => r.Available;","tryCatchPattern":"try { var instance = rulesetInfo.CreateInstance(); }\ncatch (RulesetLoadException) { /* ruleset unavailable: skip */ }","preventionTips":["Always check RulesetInfo.Available before CreateInstance.","Keep ruleset DLL versions compatible with the game.","Re-scan rulesets after updates to refresh Available flags."],"tags":["ruleset","load","assembly","version-mismatch","ruleset-load-exception"],"backgroundTag":null,"analyzedSha":"d9c73e12adff2feaae4a3e158d36fe5883faf6ca","analyzedAt":"2026-08-13T14:12:54.015Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}