From 063a426e1fe21b1bcf2b34d8a986f525a3de9342 Mon Sep 17 00:00:00 2001 From: antoineatstariongroup Date: Fri, 6 Dec 2024 10:54:30 +0100 Subject: [PATCH] fix code smell for App.cs --- EA-ModelKit/App.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/EA-ModelKit/App.cs b/EA-ModelKit/App.cs index 642f186..4fc91ac 100644 --- a/EA-ModelKit/App.cs +++ b/EA-ModelKit/App.cs @@ -82,7 +82,7 @@ public class App /// /// Stores the location of the assembly, used to resolve other dependencies /// - private static string assemblyLocation; + private static string assemblyLocation = Path.GetDirectoryName(typeof(App).Assembly.Location)!; /// /// Initializes a new instance of the class. @@ -92,8 +92,6 @@ public App() Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; Thread.CurrentThread.CurrentUICulture = CultureInfo.InvariantCulture; AppDomain.CurrentDomain.AssemblyResolve += CurrentDomainOnAssemblyResolve; - - assemblyLocation = Path.GetDirectoryName(typeof(App).Assembly.Location)!; Directory.SetCurrentDirectory(assemblyLocation); Log.Logger = new LoggerConfiguration()