"Changes the base assembly to resolve the relative path of the ContentManager from GetExecutingAssembly to GetEntryAssembly. Allows for ANX Applications that have been loaded via an AppDomain from another Directory than the executing assembly to not crash because it couldn't find the necessary files. Standalone applications still work the usual way."
This commit is contained in:
Konstantin Koch 2015-01-06 19:33:38 +00:00 committed by Konstantin Koch
parent 8e689b1fd8
commit eb1af4eec4
3 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@ namespace ANX.PlatformSystem.Linux
#region MakeRootDirectoryAbsolute
public string MakeRootDirectoryAbsolute(string relativePath)
{
var location = Assembly.GetExecutingAssembly().Location;
var location = Assembly.GetEntryAssembly().Location;
var assemblyFile = new FileInfo(location);
return Path.Combine(assemblyFile.Directory.FullName, relativePath);
}

View File

@ -13,7 +13,7 @@ namespace ANX.PlatformSystem.PsVita
#region MakeRootDirectoryAbsolute
public string MakeRootDirectoryAbsolute(string relativePath)
{
var location = Assembly.GetExecutingAssembly().Location;
var location = Assembly.GetEntryAssembly().Location;
var assemblyFile = new FileInfo(location);
return Path.Combine(assemblyFile.Directory.FullName, relativePath);
}

View File

@ -13,7 +13,7 @@ namespace ANX.PlatformSystem.Windows
#region MakeRootDirectoryAbsolute
public string MakeRootDirectoryAbsolute(string relativePath)
{
var location = Assembly.GetExecutingAssembly().Location;
var location = Assembly.GetEntryAssembly().Location;
var assemblyFile = new FileInfo(location);
return Path.Combine(assemblyFile.Directory.FullName, relativePath);
}