Closed ElektroKill closed 2 years ago
This is currently a limitation of AsmResolver (Related Washi1337/AsmResolver#93, and https://asmresolver.readthedocs.io/en/latest/dotnet/importing.html#common-caveats-using-the-importer).
Needless to say, referencing netstandard is fine in an application that targets .NET framework 4.6 or higher.
Yes, for .NET Framework 4.6, netstandard references should be fine but for lower frameworks like the ancient 2.0 or 3.5 it may cause issues which is why I made this partial fix.
Not sure if this is a viable "partial" solution then. Best to tackle this problem at its core rather than trying to bandage some unwanted side-effects that still do not really remove all references to netstandard.
Sorry for the very late response. Thanks for adding it to oldrod!
The previous method would create references to
netstndard
instead ofmscorlib
for .NET Framework executables.This does not prevent this problem from occurring when injecting the VmHelper type since the importing there is done by AsmResolver and it doesn't offer any way to easily change these references to the correct core library when injecting. In theory, OldRod could iterate over the injected members to patch the references but that seems rather hacky.