applied #16078
"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:
parent
8e689b1fd8
commit
eb1af4eec4
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user