Reflector fix "Go" after deserializing. net files

Source: Internet
Author: User
Tags reflector

After the anti-compilation project file is opened with VS2010, a series of error prompts appear when you open the form:

First case:

"The designer cannot process the code for line 152th: base. AutoScaleMode = Autoscalemode.font; The code in the method "InitializeComponent" is generated by the designer and should not be modified manually. Please remove any changes and try to reopen the designer.

The solution is: for all System.Windows.Forms. The controls inside the namespace require a declaration of the full namespace, such as the base inside. AutoScaleMode = Autoscalemode.font; change to base. AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
Second case:

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

The workaround is that this method is limited to forms that contain System.Resources.ResourceManager calls in InitializeComponent

1. resource file format conversion, convert. resources (binary) files to. resx files (XML) with C:\Program Files\Microsoft Sdks\windows\v7.0a\bin under Resgen.exe format: ResGen *.resources *.resx (. resx files are best with the same name as the form. cs file)

2. Replace the object manager in the InitializeComponent method with the resources (yes, replace only the variable name ^_^, all replaced Oh, the best way is to change the manager's statement)

3. Place the resource file. resx under the same folder as the form file. cs.

4. Exclude all forms (. cs) from the project and add (this saves the process of mapping. resx files to. csproj).

Http://htsoft.org/html/y2011/341_reflector-decompilation-net-file-repair.html

Reflector fix "Go" after deserializing. net files

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.