Closed javeiga-iest closed 7 months ago
Could you please try the latest ILRepack version: https://www.nuget.org/packages/ILRepack/2.0.23
I am using ILRepack.LIB.MSBuild.Task 2.0.29 and i get this same error with latest Oracle.ManagedDataAccess.dll (21.13.0):
packages\ILRepack.Lib.MSBuild.Task.2.0.29\build\ILRepack.Lib.MSBuild.Task.targets(16,9): error : Unable to cast object of type 'System.SByte' to type 'System.String'.
The Oracle assembly is obfuscated. There's a field a::b of type string that has an sbyte constant 32:
Not sure if we want to support this case, but if we do, we're going to have to patch Cecil.
Not sure if we want to support this case, but if we do, we're going to have to patch Cecil.
For my part, I would encourage that you try to support it. We can't always control the third party assemplies we want to merge.
Can you suggest where in the Cecil code the is? Maybe that isn't obvious yet.
It's in the stack above: Mono.Cecil.MetadataBuilder.GetConstantSignature
Cecil needs to roundtrip any assembly as is, preserving the exact bytes
Fortunately we already have a fork of Cecil, so if we do make a fix in Cecil it'll be easier
I have a patch for Cecil, i guess i should go to that repo and submit?
nope, we have a submodule:
You can send a PR against this branch of my fork: https://github.com/KirillOsenkov/cecil/tree/ilrepack
PR created. I created a test for my change, and I don't think it breaks anything else, but I am not familiar with this codebase so...
Thanks for considering it!
Now need to bump the cecil submodule to the latest commit in the ilrepack
branch
done, this should be included in the next release
Fixed in 2.0.31: https://github.com/gluck/il-repack/releases/tag/2.0.31
Using ILRepack 2.0.18 and trying to merge Oracle.ManagedDataAccess.dll returns the following error:
This works fine if we use the Oracle.ManagedDataAccess.dll v 19.18.0. All versions after that one returns System.InvalidCastException.
Any idea how to fix it?