diff --git a/tools/Tools.Common/Loaders/CmdletLoader.cs b/tools/Tools.Common/Loaders/CmdletLoader.cs index afda68441bd0..63edae07607b 100644 --- a/tools/Tools.Common/Loaders/CmdletLoader.cs +++ b/tools/Tools.Common/Loaders/CmdletLoader.cs @@ -40,6 +40,10 @@ public ModuleMetadata GetModuleMetadata(string assemblyPath, List common { var assemblyName = args.Name.Substring(0, args.Name.IndexOf(",")); var dll = Directory.GetFiles(commonOutputFolder, "*.dll").FirstOrDefault(f => Path.GetFileNameWithoutExtension(f) == assemblyName); + if (dll == null && Directory.Exists(commonOutputFolder + "\\PreloadAssemblies")) + { + dll = Directory.GetFiles(commonOutputFolder + "\\PreloadAssemblies", "*.dll").FirstOrDefault(f => Path.GetFileNameWithoutExtension(f) == assemblyName); + } if (dll == null) { continue; @@ -212,7 +216,7 @@ public ModuleMetadata GetModuleMetadata(string assemblyPath) } catch (Exception ex) { - throw ex; + throw; } ModuleMetadata.Cmdlets = results;