Skip to content

Commit 2950e32

Browse files
committed
Fix loading of net 9 assemblies and only match filename on include/exclude
1 parent 3573559 commit 2950e32

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

MonkeyLoader.ReferencePackageGenerator/Config.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,12 @@ public IEnumerable<string> Search()
9898
{
9999
foreach (var path in Directory.EnumerateFiles(SourcePath, "*", Recursive ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly))
100100
{
101-
if (Includes.Length != 0 && !Includes.Any(regex => regex.IsMatch(path)))
101+
var fileName = Path.GetFileName(path);
102+
103+
if (Includes.Length != 0 && !Includes.Any(regex => regex.IsMatch(fileName)))
102104
continue;
103105

104-
if (Excludes.Length != 0 && Excludes.Any(regex => regex.IsMatch(path)))
106+
if (Excludes.Length != 0 && Excludes.Any(regex => regex.IsMatch(fileName)))
105107
continue;
106108

107109
yield return path;

MonkeyLoader.ReferencePackageGenerator/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,8 @@ private static void Main(string[] args)
222222
}
223223

224224
var publicizer = new Publicizer();
225-
publicizer.Resolver.AddSearchDirectory(config.SourcePath);
226225
publicizer.Resolver.AddSearchDirectory("C:\\Program Files (x86)\\dotnet\\shared\\Microsoft.NETCore.App\\9.0.6");
226+
publicizer.Resolver.AddSearchDirectory(config.SourcePath);
227227

228228
try
229229
{

0 commit comments

Comments
 (0)