From e947919462164e877dc3889d7c4863a832e4b1b7 Mon Sep 17 00:00:00 2001 From: Timothy Baldridge Date: Fri, 10 Apr 2020 16:55:32 -0600 Subject: [PATCH] Retarget EntryPoint to be based off the location of Wabbajack.Common.dll --- Wabbajack.Common/Paths.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Wabbajack.Common/Paths.cs b/Wabbajack.Common/Paths.cs index eb2617dd..d5fac5b3 100644 --- a/Wabbajack.Common/Paths.cs +++ b/Wabbajack.Common/Paths.cs @@ -145,13 +145,16 @@ namespace Wabbajack.Common } } + /// + /// Returns the full path the folder that contains Wabbajack.Common. This will almost always be + /// where all the binaries for the project reside. + /// + /// public static AbsolutePath EntryPoint { get { - var location = Assembly.GetEntryAssembly()?.Location ?? null; - if (location == null) - location = Assembly.GetExecutingAssembly().Location ?? null; + var location = Assembly.GetExecutingAssembly().Location ?? null; if (location == null) throw new ArgumentException("Could not find entry point."); return ((AbsolutePath)location).Parent;