From a27973800c2bc2e4edc956d291cc0e76b211d0c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Domeradzki?= Date: Mon, 16 Sep 2024 16:45:52 +0200 Subject: [PATCH] Provide extra info when failing to initialize plugins with TypeLoadException --- ArchiSteamFarm/Plugins/PluginsCore.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ArchiSteamFarm/Plugins/PluginsCore.cs b/ArchiSteamFarm/Plugins/PluginsCore.cs index b248b79165da5..f1e1eb349b538 100644 --- a/ArchiSteamFarm/Plugins/PluginsCore.cs +++ b/ArchiSteamFarm/Plugins/PluginsCore.cs @@ -216,6 +216,13 @@ internal static async Task InitPlugins() { using CompositionHost container = configuration.CreateContainer(); activePlugins = container.GetExports().ToHashSet(); + } catch (TypeLoadException e) { + ASF.ArchiLogger.LogGenericError(Strings.FormatWarningFailedWithError(e.TypeName)); + ASF.ArchiLogger.LogGenericException(e); + + await Task.Delay(SharedInfo.InformationDelay).ConfigureAwait(false); + + return false; } catch (Exception e) { ASF.ArchiLogger.LogGenericException(e);