How to restore the resource file after reflector Decompilation

Source: Internet
Author: User
Tags reflector

Decompilation:

1. Path Problem: If path. Combine is encountered, change it accordingly.

2. Resource file problems:

Under reflector, right-click the resource files in the resources folder of the Resource Management window on the left, and select "Save as" to save.

For example, for tryassemb. form1.resx in the project folder, change it to form1.resx and move it to the tryassemb directory.

3. Open the "view designer" on the form and the following error will occur:

The modification method is to declare the full namespace for all the controls in the system. Windows. Forms. namespace,

For example, in the example, base. autoscalemode = autoscalemode. Font; you need to change it to base. autoscalemode = system. Windows. Forms. autoscalemode. Font;

The textbox textbox1 should also be changed to private system. Windows. Forms. textbox textbox1; so that vs can recognize that this control is to be drawn on the form.

4. Delegation and callback Functions

It is generally restored to the add_xxx (methodsname) method, and needs to be changed to + = methodsname

5. namespace Problems

If you want to switch to the IDE Form Designer without errors, you also need to add a namespace prefix such as system. Windows. Forms in *. CS.

6. Form Designer recognition problems

The following code is required:
Componentresourcemanager manager = new componentresourcemanager (typeof (classname ));
Replace
System. componentmodel. componentresourcemanager resources = new system. componentmodel. componentresourcemanager (typeof (classname ));
The Form Designer can be recognized normally.

 

How to restore the resource file after reflector Decompilation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.