Created
November 17, 2021 19:26
-
-
Save AmenJlili/7fee6ddcb4ff343c7d495e11f905530e to your computer and use it in GitHub Desktop.
loaddependencies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected override void OnLoadAdditionalAssemblies(DirectoryInfo addinDirectory) | |
{ | |
var assembly = addinDirectory.GetFiles().ToList().FirstOrDefault(x => x.Name.StartsWith("Microsoft.WindowsAPICodePack")); | |
if (assembly != null) | |
System.Reflection.Assembly.LoadFrom(assembly.FullName); | |
assembly = addinDirectory.GetFiles().ToList().FirstOrDefault(x => x.Name.StartsWith("Microsoft.WindowsAPICodePack.Shell")); | |
if (assembly != null) | |
System.Reflection.Assembly.LoadFrom(assembly.FullName); | |
assembly = addinDirectory.GetFiles().ToList().FirstOrDefault(x => x.Name.StartsWith("Microsoft.WindowsAPICodePack.ShellExtensions")); | |
if (assembly != null) | |
System.Reflection.Assembly.LoadFrom(assembly.FullName); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment