-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InvalidCastException when trying to merge Oracle.ManagedDataAccess.dll #319
Comments
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'. |
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? |
You can send a PR against this branch of my fork: |
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 |
done, this should be included in the next release |
Fixed in 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?
The text was updated successfully, but these errors were encountered: