Open dmagyari opened 13 years ago
Unfortunately you need to add a null check into the ShouldWeave methods on ImplementModifiableType and ImplementMethodReplacementHost in order to prevent the post build weave task from breaking. So the changes I made are look like this:
In ImplementMethodReplacementHost: if (item.Interfaces.Any(typeReference => _hostType != null && typeReference.FullName == _hostType.FullName))
In ImplementModifiableType: shouldWeave &= !item.Interfaces.Any(typeReference => _modifiableInterfaceType != null && typeReference.FullName == _modifiableInterfaceType.FullName);
Unfortunately for me I am still getting invalid IL in the modified assembly even after using the latest version of Cecil.
Does the Invalid IL occur in the original LinFu version?
I didn't get the same problem with the original version. When looking at this problem I wondered if it was a sequencing problem where the _hostType had not been set properly in that specific scenario. I didn't follow this all the way through though and that may be wide of the mark.
Hi Phillip,
I am investigating to try make work the waving in 3.5, so I tried to see if mono was in the picture, so I downloaded 0.9.4 and compiled with 3.5, when I put it on the Lib folder of linfu, I get a lot of compilation errors. I see that the version you have in lib is 0.6.9.0
I understood that the patch to support 0.9.4 is already in master in this commit: https://github.com/philiplaureano/LinFu/commit/f4942e2a87abd1b3ca691aa6eaa5501dec5545ae
But as I said when i put the library, there are hundreds. What i am missing?
Rgds
Hi Philip, I've made LinFu working with latest Cecil, You might be interested. It was almost automatic update. Some quirks were: -The vistor is missing from Cecil -Imported TypeReference instances (eg. for void) do not equal other instances of TypeReference on the same system type -> I used FullName compare I worked most on making unit test working. One still missing.
Best Regards, Dénes Magyari