Skip to content

Commit

Permalink
Merge branch 'fix-badimage' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
mntone committed May 25, 2021
2 parents ee27ef8 + 879a52a commit 49ad470
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions source/VirtualDesktop/Interop/ComInterfaceAssemblyProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,18 @@ private Assembly GetExistingAssembly()
if (int.TryParse(_assemblyRegex.Match(file.Name).Groups["build"]?.ToString(), out var build)
&& build == ProductInfo.OSBuild)
{
var name = AssemblyName.GetAssemblyName(file.FullName);
if (name.Version >= _requireVersion)
try
{
System.Diagnostics.Debug.WriteLine($"Assembly found: {file.FullName}");
var name = AssemblyName.GetAssemblyName(file.FullName);
if (name.Version >= _requireVersion)
{
System.Diagnostics.Debug.WriteLine($"Assembly found: {file.FullName}");
#if !DEBUG
return Assembly.LoadFile(file.FullName);
return Assembly.LoadFile(file.FullName);
#endif
}
}
catch (BadImageFormatException) { }
}
}
}
Expand Down

0 comments on commit 49ad470

Please sign in to comment.