Skip to content

Commit

Permalink
Rewrite mscorlib 2 to mscorlib 4
Browse files Browse the repository at this point in the history
  • Loading branch information
ds5678 committed May 13, 2024
1 parent 4391c8d commit a560e1d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Il2CppInterop.Generator/Passes/Pass90WriteToDisk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ public static void DoPass(RewriteGlobalContext context, GeneratorOptions options
var module = asmContext.NewAssembly.ManifestModule;
foreach (var reference in module.AssemblyReferences)
{
// TODO: Instead of a hack, set correctly initially via source generator
if (reference.Name == "System.Private.CoreLib")
// System.Private.CoreLib needs rewriting because references can get created during the rewrite process.
// mscorlib needs rewriting because we initially set 2.0.0.0 as the version for resolving references.
if (reference.Name?.Value is "System.Private.CoreLib" or "mscorlib")
{
CorlibReferences.RewriteReferenceToMscorlib(reference);
continue;
Expand Down

0 comments on commit a560e1d

Please sign in to comment.