From eb1af4eec4de9329457578f3db8fac73a9a96497 Mon Sep 17 00:00:00 2001 From: Konstantin Koch Date: Tue, 6 Jan 2015 19:33:38 +0000 Subject: [PATCH] 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." --- PlatformSystems/ANX.PlatformSystem.Linux/LinuxContentManager.cs | 2 +- .../ANX.PlatformSystem.PsVita/PsVitaContentManager.cs | 2 +- .../ANX.PlatformSystem.Windows/WindowsContentManager.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PlatformSystems/ANX.PlatformSystem.Linux/LinuxContentManager.cs b/PlatformSystems/ANX.PlatformSystem.Linux/LinuxContentManager.cs index 2fe865d4..3a2ad56c 100644 --- a/PlatformSystems/ANX.PlatformSystem.Linux/LinuxContentManager.cs +++ b/PlatformSystems/ANX.PlatformSystem.Linux/LinuxContentManager.cs @@ -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); } diff --git a/PlatformSystems/ANX.PlatformSystem.PsVita/PsVitaContentManager.cs b/PlatformSystems/ANX.PlatformSystem.PsVita/PsVitaContentManager.cs index cb129b91..32f557b0 100644 --- a/PlatformSystems/ANX.PlatformSystem.PsVita/PsVitaContentManager.cs +++ b/PlatformSystems/ANX.PlatformSystem.PsVita/PsVitaContentManager.cs @@ -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); } diff --git a/PlatformSystems/ANX.PlatformSystem.Windows/WindowsContentManager.cs b/PlatformSystems/ANX.PlatformSystem.Windows/WindowsContentManager.cs index ce0322ee..b6b79a0b 100644 --- a/PlatformSystems/ANX.PlatformSystem.Windows/WindowsContentManager.cs +++ b/PlatformSystems/ANX.PlatformSystem.Windows/WindowsContentManager.cs @@ -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); }