Skip to content

Fix "Failed to add ruleset osu.Game.Rulesets.Karaoke.Resources" error in the local run. #9

Open
@andy840119

Description

@andy840119

It's caused by the dll name start with osu.Game.Rulesets.
See the RulesetStore in the osu.game.

public abstract class RulesetStore : IDisposable, IRulesetStore
{
    private const string ruleset_library_prefix = @"osu.Game.Rulesets";'
...

Here's the log:

2022-06-08 14:38:10 [verbose]: ⚠️ Failed to add ruleset osu.Game.Rulesets.Karaoke.Resources, Version=2022.608.1.0, Culture=neutral, PublicKeyToken=null
2022-06-08 14:38:10 [verbose]: 
2022-06-08 14:38:10 [verbose]: This error has been automatically reported to the devs.
2022-06-08 14:38:10 [verbose]: ⚠️ Failed to add ruleset osu.Game.Rulesets.Karaoke.Resources, Version=2022.608.1.0, Culture=neutral, PublicKeyToken=null
2022-06-08 14:38:10 [verbose]: 
2022-06-08 14:38:10 [verbose]: This error has been automatically reported to the devs.
2022-06-08 14:38:10 [verbose]: ⚠️ Click to resume first-run setup at any point
2022-06-08 14:38:11 [debug]: Focus changed from nothing to NotificationOverlay.
2022-06-08 14:38:12 [debug]: MouseDownEvent(Left) handled by NotificationOverlay.
2022-06-08 14:38:12 [debug]: ClickEvent(Left) handled by SimpleErrorNotification.
2022-06-08 14:38:12 [debug]: MouseClick handled by SimpleErrorNotification.
2022-06-08 14:38:15 [debug]: MouseDownEvent(Left) handled by NotificationOverlay.
2022-06-08 14:38:15 [debug]: Focus changed from NotificationOverlay to nothing.
2022-06-08 14:38:15 [debug]: MouseDownEvent(Left) handled by OsuLogo.
2022-06-08 14:38:15 [verbose]: ButtonSystem's state changed from Initial to TopLevel
2022-06-08 14:38:15 [debug]: ClickEvent(Left) handled by OsuLogo.
2022-06-08 14:38:15 [debug]: MouseClick handled by OsuLogo.
2022-06-08 14:38:16 [debug]: Focus changed from nothing to LoginForm.
2022-06-08 14:38:16 [debug]: Focus changed from LoginForm to LoginPanel.
2022-06-08 14:38:16 [debug]: Focus changed from LoginPanel to LoginForm.
2022-06-08 14:38:16 [debug]: Focus changed from LoginForm to OsuTextBox.
2022-06-08 14:38:16 [debug]: MouseDownEvent(Left) handled by LoginOverlay.
2022-06-08 14:38:16 [debug]: Focus changed from OsuTextBox to nothing.
2022-06-08 14:38:16 [debug]: ClickEvent(Left) handled by MainMenuButton.
2022-06-08 14:38:16 [debug]: MouseClick handled by MainMenuButton.
2022-06-08 14:38:16 [debug]: Focus changed from nothing to SeekLimitedSearchTextBox.
2022-06-08 14:38:20 [debug]: MouseDownEvent(Left) handled by SettingsOverlay.
2022-06-08 14:38:20 [debug]: ClickEvent(Left) handled by SettingsButton.
2022-06-08 14:38:20 [debug]: MouseClick handled by SettingsButton.

Activity

andy840119

andy840119 commented on Jun 8, 2022

@andy840119
MemberAuthor

And notice that it will only caused in the local.
Because it will be packed into single dll in the release build.

changed the title [-]Failed to add ruleset osu.Game.Rulesets.Karaoke.Resources issue.[/-] [+]Fix "Failed to add ruleset osu.Game.Rulesets.Karaoke.Resources" error in the local run.[/+] on Jun 8, 2022
andy840119

andy840119 commented on Jun 8, 2022

@andy840119
MemberAuthor

Not a big deal, just annoying.

andy840119

andy840119 commented on Jun 11, 2022

@andy840119
MemberAuthor

Not really sure will it be a good idea to place something like FakeRuleset in this repo?
Anyway, the FakeRuleset will not be found in the release build, i guess?

See RulesetStore in the osu.game

try
{
    LoadedAssemblies[assembly] = assembly.GetTypes().First(t => t.IsPublic && t.IsSubclassOf(typeof(Ruleset)));
}
catch (Exception e)
{
    Logger.Error(e, $"Failed to add ruleset {assembly}");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @andy840119

        Issue actions

          Fix "Failed to add ruleset osu.Game.Rulesets.Karaoke.Resources" error in the local run. · Issue #9 · karaoke-dev/karaoke-resources