mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Retarget EntryPoint to be based off the location of Wabbajack.Common.dll
This commit is contained in:
parent
c8120adf8b
commit
e947919462
@ -145,13 +145,16 @@ namespace Wabbajack.Common
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the full path the folder that contains Wabbajack.Common. This will almost always be
|
||||||
|
/// where all the binaries for the project reside.
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="ArgumentException"></exception>
|
||||||
public static AbsolutePath EntryPoint
|
public static AbsolutePath EntryPoint
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
var location = Assembly.GetEntryAssembly()?.Location ?? null;
|
var location = Assembly.GetExecutingAssembly().Location ?? null;
|
||||||
if (location == null)
|
|
||||||
location = Assembly.GetExecutingAssembly().Location ?? null;
|
|
||||||
if (location == null)
|
if (location == null)
|
||||||
throw new ArgumentException("Could not find entry point.");
|
throw new ArgumentException("Could not find entry point.");
|
||||||
return ((AbsolutePath)location).Parent;
|
return ((AbsolutePath)location).Parent;
|
||||||
|
Loading…
Reference in New Issue
Block a user