If you are looking for software to use, go to Huajun Software Park! software release

How to repair .NET Reflector decompiled project-How to repair .NET Reflector decompiled project

Author: Huluwa Date: 2021-08-16

.NET Reflector
.NET Reflector-11.1 Green Chinese Version

programming tools Storage size: 10.65MB Time: 2020-05-19

Software introduction: Reflector is a free program written by Microsoft employee Lutz Roeder. The .NET Reflector tool can centralize .NET programs...

Download now

.NET There may be some errors in recompiling after Reflector decompiles and generates the project. At this time, we need to modify it to compile normally. So how to fix it? The editor will share the specific operation methods as follows.

​​Create a test project:

​​Create a simple project, a Winform form, including a background image.



Decompile test program:

              Adding test programs to .NET Reflector



After selecting the test program, right-click and select Export



Decompile project repair:

Problem: base.AutoScaleMode = AutoScaleMode.Font; The code within the method "InitializeComponent" is generated by the designer and should not be modified manually. Please remove any changes and try reopening the designer.

Processing method: All controls in the System.Windows.Forms. namespace require full namespace declaration.

Example: base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;


Problem: The variable "manager" is not declared or has never been assigned a value.

Processing method:

1) First convert the resources file into a resx resource file, name it to match the corresponding *.cs file name, and place it in the same directory as the corresponding *.cs code (such as compiling WindowsFormsApplication1.Form1.resources into Form1 .resx). The compilation tools are in C:Program Files (x86)Microsoft SDKsWindows(Win7Win8),C:Program FilesMicrosoft resgen.exe(XP) under SDKsWindowsv7.0Abin

CMD command format: resgen *.resources *.resx, as follows:

Note: After generating the resx resource file, exclude the corresponding *.cs file and then add it again to map the .resx file to the project.

​ ​ 2) Replace the object manager in the InitializeComponent method with resources (replace the variable name)




Problem: System.Resources.MissingManifestResourceException: No resources were found for the specified culture or non-culture. Please ensure that 'xxxx.Properties.Resources.resources' is properly embedded or linked to assembly 'xxxx' at compile time, or that all required satellite assemblies are loadable and fully signed.

Processing method: Just add the image resources again



The editor has shared here the repair method for .NET Reflector decompilation project. I hope it can help everyone.

Related articles