Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>2017-12-03 10:26:21 +0300
committerJan Kotas <jkotas@microsoft.com>2017-12-03 10:26:21 +0300
commit70e9e1fbabd269f3eaa4355fabd09202f2cdb8e9 (patch)
tree737c5b3c989279f971f3319a9535e5070e2f9b24 /src/System.Private.Reflection.Core
parented74e6a7adf67511a17f5c6fbc79a9f90cc7cacc (diff)
Do not throw if default assembly can't be found (#5058)
Diffstat (limited to 'src/System.Private.Reflection.Core')
-rw-r--r--src/System.Private.Reflection.Core/src/Internal/Reflection/Core/Execution/ExecutionDomain.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/System.Private.Reflection.Core/src/Internal/Reflection/Core/Execution/ExecutionDomain.cs b/src/System.Private.Reflection.Core/src/Internal/Reflection/Core/Execution/ExecutionDomain.cs
index 2f1657ed8..361029169 100644
--- a/src/System.Private.Reflection.Core/src/Internal/Reflection/Core/Execution/ExecutionDomain.cs
+++ b/src/System.Private.Reflection.Core/src/Internal/Reflection/Core/Execution/ExecutionDomain.cs
@@ -91,7 +91,9 @@ namespace Internal.Reflection.Core.Execution
foreach (string defaultAssemblyName in defaultAssemblyNames)
{
RuntimeAssemblyName runtimeAssemblyName = AssemblyNameParser.Parse(defaultAssemblyName);
- RuntimeAssembly defaultAssembly = RuntimeAssembly.GetRuntimeAssembly(runtimeAssemblyName);
+ RuntimeAssembly defaultAssembly = RuntimeAssembly.GetRuntimeAssemblyIfExists(runtimeAssemblyName);
+ if (defaultAssembly == null)
+ continue;
Type resolvedType = defaultAssembly.GetTypeCore(coreTypeName, ignoreCase: ignoreCase);
if (resolvedType != null)
return resolvedType;