dnSpy - How to fix Missing compiler required member



Have got this error when trying to compile?




Well they are working with the fix but here is the workaround

Remove all assemblies. You can open your assembly to edit later if you want.


Edit any code you want to edit

Paste "using System.Runtime.InteropServices;" and the namespace System.Runtime.CompilerServices code below the other namespace code (See screenshow below)


Compile it. It should compile without any error.

Please note, you must add the namespace System.Runtime.InteropServices code again every code changes

---------------------------------------------------------------

If you want to copy the code manually, follow this steps.

Click File -> Open from GAC



Search mscorlib, select mscorlib 4.0.0.0 and click OK



Search CompilationRelaxationsAttribute and copy the whole code to somewhere else for later use.

Popular Posts

[TOOL] Unity Assets Bundle Extractor

Il2CppDumper GUI Android App