Miista / pose

Replace any .NET method (including static and non-virtual) with a delegate
MIT License
27 stars 3 forks source link

Add support for .NET 8 #8

Closed Miista closed 10 months ago

Miista commented 10 months ago

The sample app (Sandbox) worked when targeting .NET 7.0 (DateTime.Now returning a timestamp in the year 2004). I have not conducted extensive testing, though.

The same app failed to run when targeting .NET 8.0 due to the Bake... array method.

Originally posted by @stanimirsellercloud in https://github.com/Miista/pose/issues/5#issuecomment-1890438600

Miista commented 10 months ago

It looks like the BakeByteArray is missing from ILGenerator on .NET 8. I will need to find out where it has been moved to.

Miista commented 10 months ago

@stanimirsellercloud I've located the method. It has been moved to RuntimeILGenerator. I have added a preprocessor directive specifically for .NET 8 or greater which locates the method from here instead.

Please note that we still suffer from the same issue as described in #6.