#4.3.0
1 messages · Page 1 of 1 (latest)
added myself to the thread.
I'll update ModCore to the latest nightly as well. Issues stemming from the library will be relayed here, if any.
@orchid ivy should we close this, or keep it open?
close

@restive wraith says 4.3.0 CNext is depending on a nightly version of the lib (which, is strange because it's a project reference, but, sure)
Have fun 
yeah idk
This is the exception stack trace I get:
System.IO.FileNotFoundException: Could not load file or assembly 'DSharpPlus, Version=4.3.0.1155, Culture=neutral, PublicKeyToken=null'. Le fichier spécifié est introuvable.
File name: 'DSharpPlus, Version=4.3.0.1155, Culture=neutral, PublicKeyToken=null'
at Hammer.Commands.InfoCommand.InfoAsync(InteractionContext context)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Hammer.Commands.InfoCommand.InfoAsync(InteractionContext context)
@halcyon depot said "use stable version" which...
<PackageReference Include="DSharpPlus" Version="4.3.0"/>
<PackageReference Include="DSharpPlus.Interactivity" Version="4.3.0"/>
<PackageReference Include="DSharpPlus.SlashCommands" Version="4.3.0"/>
I am 
cnext as well?
I'm not using cnext
I never use it
But that's not the library it's failing to find

smh misconvey of my problem
lol
the point stands
I mean I do but that's besides the point lol
oh and btw no, there's no more to this. this is the complete stack trace
preferably restoring with disabling nuget cache
Irrelevant, this is a fresh build locally and the same thing also happens in a docker container where it's always a clean build anyway
strange. @grand silo doesn't have this issue despite using the same version
Logs on my VPS show the same thing:
[19:40:41 INFO] [Hammer.Services.BotService] Member 94248427663130624; Yasahiro#0001 (🔨 Haiku enthusiast) ran slash command /info
[19:40:41 ERROR] [Hammer.Services.BotService] An exception was thrown when executing slash command 'info': System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.IO.FileLoadException: Could not load file or assembly 'DSharpPlus, Version=4.3.0.1155, Culture=neutral, PublicKeyToken=null'. The located assembly's manifest definition does not match the assembly reference. (0x80131040)
File name: 'DSharpPlus, Version=4.3.0.1155, Culture=neutral, PublicKeyToken=null'
at Hammer.Commands.InfoCommand.InfoAsync(InteractionContext context)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Hammer.Commands.InfoCommand.InfoAsync(InteractionContext context)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at DSharpPlus.SlashCommands.SlashCommandsExtension.RunCommandAsync(BaseContext context, MethodInfo method, IEnumerable`1 args)
at DSharpPlus.SlashCommands.SlashCommandsExtension.<>c__DisplayClass47_0.<<InteractionHandler>b__0>d.MoveNext()
For reference, this is the command method. This worked perfectly fine until I updated to 4.3.0 stable, so the command method should be fine
[SlashCommand("info", "Displays information about the bot.")]
[SlashRequireGuild]
public async Task InfoAsync(InteractionContext context)
{
DiscordClient client = context.Client;
DiscordMember member = (await client.CurrentUser.GetAsMemberOfAsync(context.Guild).ConfigureAwait(false))!;
string hammerVersion = _botService.Version;
var embed = new DiscordEmbedBuilder();
embed.WithAuthor(member);
embed.WithColor(member.Color);
embed.WithThumbnail(member.AvatarUrl);
embed.WithTitle($"Hammer v{hammerVersion}");
embed.AddField("Ping", client.Ping, true);
embed.AddField("Uptime", (DateTimeOffset.UtcNow - _botService.StartedAt).Humanize(), true);
var builder = new StringBuilder();
builder.AppendLine($"Hammer: {hammerVersion}");
builder.AppendLine($"D#+: {client.VersionString}");
builder.AppendLine($"Gateway: {client.GatewayVersion}");
builder.AppendLine($"CLR: {Environment.Version.ToString(3)}");
builder.AppendLine($"Host: {Environment.OSVersion}");
embed.AddField("Version", Formatter.BlockCode(builder.ToString()));
await context.CreateResponseAsync(embed, true).ConfigureAwait(false);
}
GetAsMemberOfAsync is just an extension method
mind sharing the full csproj?
it's public here:
https://github.com/BrackeysBot/Hammer
given the fact the last release is from 16 days ago, no, it probably doesn't
It does but it references a different version that the exception message is reporting, plus it references as PrivateAssets so clients don't use that version anyway
<PackageReference Include="DSharpPlus" Version="4.3.0-nightly-01189" PrivateAssets="All"/>
X10D.DSharpPlus csproj ^
you'd still potentially get an error, privateassets or not
yeah I looked it up
but yeah that is the wrong version
But this is 01189, and the exception reports 01155
interesting how it asks for a different version still
I can push an update for my extension lib so it references stable 🤔 maybe that would fix it, but I doubt it. Worth a shot though
The runtime does funny things when loading dependencies
Yep just pushed an update. Will upgrade the package in the bot once nuget.org does it validation crap so gimme a few
Yay CI failure!
pretty cool that it's the official bot for brackeys' server
I sometimes watch their videos lol
Yee I decided to rewrite the bot(s) in the server because there used to be just one bot that handled everything. The codebase was abhorrent and just such a pain to work with
So now we have multiple single-purpose bots 
I mean that's to be expected when Unity devs need to write regular .NET code :^):^):^)
don't take that too hard, I work with Unity professionally as well
Oh it's fine
I try to avoid Unity at all costs. I hate it so much
understandable lol
Fun weird little thing: Rider reports the latest version of my package being nightly 139 when the latest that I just published is 137 
cache
System.IO.FileNotFoundException: Could not load file or assembly 'DSharpPlus, Version=4.3.0.1189, Culture=neutral, PublicKeyToken=null'. Le fichier spécifié est introuvable.
File name: 'DSharpPlus, Version=4.3.0.1189, Culture=neutral, PublicKeyToken=null'
at Hammer.Commands.InfoCommand.InfoAsync(InteractionContext context)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Hammer.Commands.InfoCommand.InfoAsync(InteractionContext context)
Alright. Actual update: Now it... reports it wants 1189 
hi op
And yes I dotnet clean'd
oh wait I typed 137 woops
meant to be 147
disregard, trying again 
But this does hint that maybe the issue was my package
Okay yep confirmed. The issue was indeed X10D.DSharpPlus referencing the nightly 
Thank you @tranquil charm and @orchid ivy this was a rookie mistake kek, albeit a subtle one
And velvet, make forums now thx
