dnSpy - How to fix Missing compiler required member
Have got this error when trying to compile?
Issue #761 https://github.com/0xd4d/dnSpy/issues/761
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.
Copy the code from https://gitlab.com/andnixsh/Hack_Source_Center/blob/master/Missing%20compiler%20required%20member.cs
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.