Tutorial dnSpy - How to fix compiler error on main.g.cs

AndnixSH

PMT Elite Modder
Original poster
Staff member
Modding-Team
Jun 27, 2017
4,680
296,970
1,213
Modding World

Are you getting errors like this when trying to compile?

1540314551491.png


Try edit only Method instead whole Class

Still getting error? follow the simple steps to fix it.

Double click on errors, It will point you to the method. Remove all method that caused error then compile

1540314562779.png


Common error is generated code <>f__mg$cache0, remove it
[global::System.Runtime.CompilerServices.CompilerGenerated]
private static global::System.Action<string> <>f__mg$cache0;

1540314568977.png


Done!

1540314575419.png
 
Last edited: