Skip to content

Commit 3573559

Browse files
committed
Some fixes and update for net 9 assemblies
1 parent a475b52 commit 3573559

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

MonkeyLoader.ReferencePackageGenerator/Config.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ public string[] IncludePatterns
7272
[JsonIgnore]
7373
public Dictionary<string, Version> VersionOverrides { get; set; }
7474

75+
public string VersionReleaseLabel { get; set; }
76+
7577
[JsonProperty(nameof(VersionBoost))]
7678
private string? VersionBoostString
7779
{
@@ -88,8 +90,8 @@ private Dictionary<string, string> VersionOverrideStrings
8890

8991
public Config()
9092
{
91-
IncludePatterns = [@".+\.dll", @".+\.exe"];
92-
ExcludePatterns = [@"Microsoft\..+", @"System\..+", @"Mono\..+", @"UnityEngine\..+"];
93+
IncludePatterns = [@".+\.dll$", @".+\.exe$"];
94+
ExcludePatterns = [@"^Microsoft\..+", @"^System\..+", @"^Mono\..+", @"^UnityEngine\..+"];
9395
}
9496

9597
public IEnumerable<string> Search()

MonkeyLoader.ReferencePackageGenerator/Program.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ private static async Task GenerateNuGetPackageAsync(Config config, string target
7474
var builder = new PackageBuilder
7575
{
7676
Id = $"{config.PackageIdPrefix}{Path.GetFileNameWithoutExtension(target)}",
77-
Version = new NuGetVersion(version),
77+
Version = new NuGetVersion(version, config.VersionReleaseLabel),
7878

7979
Title = $"Publicized {Path.GetFileNameWithoutExtension(target)} Reference",
8080
Description = $"Publicized reference package for {Path.GetFileName(target)}.",
@@ -120,12 +120,12 @@ private static async Task GenerateNuGetPackageAsync(Config config, string target
120120
}
121121

122122
var ignoreAccessChecksToPath = GenerateIgnoresAccessChecksToFile(target);
123-
builder.AddFiles("", ignoreAccessChecksToPath, "contentFiles/any/any/IgnoresAccessChecksTo/");
123+
builder.AddFiles("", ignoreAccessChecksToPath, "contentFiles/cs/any/IgnoresAccessChecksTo/");
124124
builder.AddFiles("", ignoreAccessChecksToPath, "content/IgnoresAccessChecksTo/");
125125

126126
builder.ContentFiles.Add(new ManifestContentFiles
127127
{
128-
Include = $"any/any/IgnoresAccessChecksTo/{Path.GetFileNameWithoutExtension(target)}.cs",
128+
Include = $"cs/any/IgnoresAccessChecksTo/{Path.GetFileNameWithoutExtension(target)}.cs",
129129
BuildAction = "compile",
130130
Flatten = "false",
131131
CopyToOutput = "false"
@@ -223,6 +223,7 @@ private static void Main(string[] args)
223223

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

227228
try
228229
{

0 commit comments

Comments
 (0)