Skip to content
This repository has been archived by the owner on Mar 26, 2019. It is now read-only.

Commit

Permalink
#2 scan exes as well as dlls
Browse files Browse the repository at this point in the history
  • Loading branch information
alhardy committed Oct 20, 2017
1 parent 92a477f commit b8ce363
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ internal static IEnumerable<Assembly> GetCandidateAssemblies(DependencyContext d
}
else
{
var nonSystemAssemblies = from outputAssemblyPath in System.IO.Directory.GetFiles(AppDomain.CurrentDomain.BaseDirectory, "*.dll")
var dlls = System.IO.Directory.GetFiles(AppDomain.CurrentDomain.BaseDirectory, "*.dll");
var exes = System.IO.Directory.GetFiles(AppDomain.CurrentDomain.BaseDirectory, "*.exe");
var files = dlls?.Concat(exes);
var nonSystemAssemblies = from outputAssemblyPath in files
let assemblyFileName = System.IO.Path.GetFileNameWithoutExtension(outputAssemblyPath)
where assemblyFileName != null && !assemblyFileName.ToLowerInvariant().StartsWith("system.") && !assemblyFileName.ToLowerInvariant().StartsWith("microsoft.")
select Assembly.Load(AssemblyName.GetAssemblyName(outputAssemblyPath));
Expand Down

0 comments on commit b8ce363

Please sign in to comment.