diff options
author | Santiago Fernandez Madero <safern@microsoft.com> | 2017-07-20 16:36:15 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-20 16:36:15 -0700 |
commit | fa3d1cdd5583d5b278dd1a9c246ff30ca6966973 (patch) | |
tree | fdba2853ba78d5cb2fdab09df2f0cccf18296df0 /src | |
parent | 896ff6fa537c32549a0e3c5c3acb1b790598bafe (diff) | |
download | coreclr-fa3d1cdd5583d5b278dd1a9c246ff30ca6966973.tar.gz coreclr-fa3d1cdd5583d5b278dd1a9c246ff30ca6966973.tar.bz2 coreclr-fa3d1cdd5583d5b278dd1a9c246ff30ca6966973.zip |
Fix resources lookup to use satellite assembly resouce lookup inside AppX when the assembly is Private.Corelib (#12954)
Diffstat (limited to 'src')
-rw-r--r-- | src/mscorlib/src/System/Resources/ResourceManager.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mscorlib/src/System/Resources/ResourceManager.cs b/src/mscorlib/src/System/Resources/ResourceManager.cs index 92b935d931..f171239857 100644 --- a/src/mscorlib/src/System/Resources/ResourceManager.cs +++ b/src/mscorlib/src/System/Resources/ResourceManager.cs @@ -889,7 +889,7 @@ namespace System.Resources // contains the PRI resources. private bool ShouldUseSatelliteAssemblyResourceLookupUnderAppX(RuntimeAssembly resourcesAssembly) { - bool fUseSatelliteAssemblyResourceLookupUnderAppX = true; // TODO: https://github.com/dotnet/coreclr/issues/12178 once we fix our uap testhost + bool fUseSatelliteAssemblyResourceLookupUnderAppX = typeof(Object).Assembly == resourcesAssembly; if (!fUseSatelliteAssemblyResourceLookupUnderAppX) { @@ -1038,6 +1038,11 @@ namespace System.Resources if (e.HResult != __HResults.ERROR_MRM_MAP_NOT_FOUND) throw; // Unexpected exception code. Bubble it up to the caller. } + + if (!_PRIonAppXInitialized) + { + _bUsingModernResourceManagement = false; + } // Allow all other exception types to bubble up to the caller. // Yes, this causes us to potentially throw exception types that are not documented. @@ -1122,7 +1127,7 @@ namespace System.Resources { // When running inside AppX we want to ignore the languages list when trying to come up with our CurrentUICulture. // This line behaves the same way as CultureInfo.CurrentUICulture would have in .NET 4 - culture = CultureInfo.GetCurrentUICultureNoAppX(); + culture = CultureInfo.CurrentUICulture; } ResourceSet last = GetFirstResourceSet(culture); |