Closed sakno closed 8 months ago
Hi, InlineIL uses the Cecil from Fody, which uses https://github.com/jbevain/cecil (with a few patches on its own), not https://github.com/dotnet/cecil.
They usually backport fixes like this to https://github.com/jbevain/cecil, and this has been done there: https://github.com/jbevain/cecil/pull/888.
But Fody actually uses its own Cecil from https://github.com/Fody/cecil, and the latest release https://github.com/Fody/Fody/releases/tag/6.8.0 updates Cecil as you say. So we get the following dependency "stack" in the end:
So I'm not sure what you're asking for here. Are you saying that InlineIL 1.7.4 causes the exception when used with Fody 6.8.0, or are you asking me to release an updated InlineIL version which depends on Fody 6.8.0?
Everything should work fine if you use InlineIL 1.7.4 with Fody 6.8.0. If you can confirm that, I can release an update which depends on Fody 6.8.0 so that the latest version of Cecil is used by default.
I think the issue can be closed. The root cause is Code Coverage instrumentation from .NET Test Sdk which uses outdated Cecil.
Ok, but since you got this issue I guess I should update InlineIL anyway to use Fody 6.8.0 by default.
I've released v1.8.0
Starting from .NET 8, it's possible to use pattern like this:
which is compiled to
Previously, it was allowed for
ROS<byte>
only. There was a bug in Cecil library: dotnet/cecil#61 that leads to the following exception:In my case, this exception is always reproducible. I think it happens because InlineIL uses outdated Cecil library. I'm not sure for 100% but it's a main suspicion. Could you release a new InlineIL with updated Fody and Cecil dependencies? Latest Fody version uses updated Cecil (6.8.0).