Lachee / discord-rpc-csharp

C# custom implementation for Discord Rich Presence. Not deprecated and still available!
MIT License
560 stars 93 forks source link

[BUG] Could not load file or assembly #156

Closed ghost closed 2 years ago

ghost commented 2 years ago

Describe the bug When trying to debug/build I get this message:

Unhandled exception. System.IO.FileLoadException: Could not load file or assembly 'DiscordRPC, Version=1.0.175.0, Culture=neutral, PublicKeyToken=null'. The loc
ated assembly's manifest definition does not match the assembly reference. (0x80
131040)
File name: 'DiscordRPC, Version=1.0.175.0, Culture=neutral, PublicKeyToken=null'
 at DiscordRPC.Program.Main()

To Reproduce None..

Expected behavior Running without having this error and to set my presence.

Desktop (please complete the following information):

Additional context See below my code:

namespace DiscordRPC
{
    class Program
    {
        static void Main()
        {
            var RpcClient = new DiscordRpcClient("CLIENT_ID");

            RpcClient.Initialize();

            RpcClient.SetPresence(new RichPresence()
            {
                Details = "Here comes Detail...",
                State = "Here comes state...",

                Assets = new Assets()
                {
                    LargeImageKey = "app_logo",
                    LargeImageText = "Logo hover",
                    SmallImageKey = "",
                    SmallImageText = ""
                }
            });

            RpcClient.Invoke();
            RpcClient.Dispose();
        }
    }
}

Logs It never has the chance to make a log...

Lachee commented 2 years ago

Please make sure your nuget is downloading and installing the package correctly. This issue is only if for some reason the .dll of this library isn't present with the application.

ghost commented 2 years ago

Nuget is installing and downloading the package correctly. I re-installed it multiple times, but it is still not working.