Fixed vulnerability issue and upgraded to discord.net 3.18

This commit is contained in:
2025-10-12 22:14:39 +03:00
parent b8a3f189a9
commit fae4b37ef9
9 changed files with 53 additions and 34 deletions

View File

@@ -39,24 +39,21 @@ static Assembly? LoadFromSameFolder(object? sender, ResolveEventArgs args, strin
string assemblyPath = Path.Combine(librariesFolder, assemblyFileName);
Console.WriteLine($"Attempting to load from: {assemblyPath}");
if (File.Exists(assemblyPath))
{
try
{
var fileAssembly = Assembly.LoadFrom(assemblyPath);
Console.WriteLine($"Successfully loaded Assembly: {fileAssembly.FullName}");
return fileAssembly;
}
catch (Exception ex)
{
Console.WriteLine($"Error loading assembly from '{assemblyPath}': {ex.Message}");
// Optionally log the full exception for debugging
}
}
else
if (!File.Exists(assemblyPath))
{
Console.WriteLine($"File not found: {assemblyPath}");
continue;
}
try
{
Assembly assembly = Assembly.LoadFrom(assemblyPath);
return assembly;
}
catch (Exception ex)
{
Console.WriteLine($"Failed to load assembly: {assemblyPath}. Error message: {ex.Message}");
}
}