Flee icon indicating copy to clipboard operation
Flee copied to clipboard

.net 8 upgrade?

Open alipievemil opened this issue 2 years ago • 3 comments

Is there any plan to upgrade this library to .Net 8?

alipievemil avatar Mar 20 '24 18:03 alipievemil

i'm using with .net 8, but I had to make a 1 line change

hunkydoryrepair avatar Mar 08 '25 06:03 hunkydoryrepair

I also managed to upgrade to .NET 8.0 and had to make the following change:

In Utility.cs, there's a method GetILGeneratorLength that's using reflection to get a private field m_length that no longer exists in this version of .NET.

To fix this, I deleted this method from the Utility class and refactored the FleeILGenerator.ILGeneratorLength property from:

private int ILGeneratorLength => Utility.GetILGeneratorLength(_myIlGenerator);

To:

private int ILGeneratorLength => _myIlGenerator.ILOffset;

More info: https://github.com/dotnet/runtime/issues/94662

caiosm1005 avatar May 06 '25 22:05 caiosm1005

Created PR #115 with the necessary changes for targeting .NET 8.0. Hopefully the author sees it and merges it some day (he doesn't seem to be active in a while). I think this issue can be closed.

caiosm1005 avatar May 22 '25 03:05 caiosm1005