Skip to content

Commit

Permalink
(maint) Do not error on missing SMA dll resources
Browse files Browse the repository at this point in the history
When searching for dll resources for
System.Management.Automation, if the assembly ends with ".resources"
and the culture is "en-US", just return null instead of attempting to
look for the resource. It's unlikely to be found.
  • Loading branch information
ferventcoder authored and Russell Mora committed Jan 23, 2017
1 parent 5d37976 commit 246c205
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,11 @@ private System.Reflection.Assembly attempt_version_load(AssemblyName requestedAs

requestedAssembly.Version = version;

if (requestedAssembly.Name.EndsWith(".resources", StringComparison.OrdinalIgnoreCase) && requestedAssembly.CultureInfo.Name.is_equal_to("en-US"))
{
return null;
}

try
{
return System.Reflection.Assembly.Load(requestedAssembly);
Expand Down

0 comments on commit 246c205

Please sign in to comment.