login | about | faq

If you have any feedback from our EAP, we've created a UserVoice forum especially for you! Check it out, and let us know what you think of the latest Early Access build.

Dear sir, I am using trial version.I want to decompile .Net exe. it export successfully but when I load a project, I am unable to open any Form. after opening I got the given bellow following error

To prevent possible data loss before loading the designer, the following errors must be resolved:

3 Errors

Duplicate declaration of member 'size2'

Instances of this error (1)

  1. Show Call Stack

at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeInstance(IDesignerSerializationManager manager, Type type, Object[] parameters, String name, Boolean addToContainer) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)

Help with this error

MSDN Help

Forum posts about this error

Search the MSDN Forums for posts related to this error

The type 'System.Windows.Forms.Form' has no property named 'Button1'. Go to code

Instances of this error (7)

  1. WindowsApplication_VB Form1.vb Line:68 Column:1 Show Call Stack

at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializePropertyAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement, CodePropertyReferenceExpression propertyReferenceEx, Boolean reportError) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)

  1. WindowsApplication_VB Form1.vb Line:71 Column:1 Show Call Stack

at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializePropertyReferenceExpression(IDesignerSerializationManager manager, CodePropertyReferenceExpression propertyReferenceEx, Boolean reportError) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializePropertyAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement, CodePropertyReferenceExpression propertyReferenceEx, Boolean reportError) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)

  1. WindowsApplication_VB Form1.vb Line:72 Column:1 Show Call Stack

at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializePropertyReferenceExpression(IDesignerSerializationManager manager, CodePropertyReferenceExpression propertyReferenceEx, Boolean reportError) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializePropertyAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement, CodePropertyReferenceExpression propertyReferenceEx, Boolean reportError) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)

  1. WindowsApplication_VB Form1.vb Line:74 Column:1 Show Call Stack

at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializePropertyReferenceExpression(IDesignerSerializationManager manager, CodePropertyReferenceExpression propertyReferenceEx, Boolean reportError) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializePropertyAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement, CodePropertyReferenceExpression propertyReferenceEx, Boolean reportError) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)

  1. WindowsApplication_VB Form1.vb Line:75 Column:1 Show Call Stack

at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializePropertyReferenceExpression(IDesignerSerializationManager manager, CodePropertyReferenceExpression propertyReferenceEx, Boolean reportError) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializePropertyAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement, CodePropertyReferenceExpression propertyReferenceEx, Boolean reportError) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)

  1. WindowsApplication_VB Form1.vb Line:76 Column:1 Show Call Stack

at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializePropertyReferenceExpression(IDesignerSerializationManager manager, CodePropertyReferenceExpression propertyReferenceEx, Boolean reportError) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializePropertyAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement, CodePropertyReferenceExpression propertyReferenceEx, Boolean reportError) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)

  1. WindowsApplication_VB Form1.vb Line:83 Column:1 Show Call Stack

at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializePropertyReferenceExpression(IDesignerSerializationManager manager, CodePropertyReferenceExpression propertyReferenceEx, Boolean reportError) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)

Help with this error

MSDN Help

Forum posts about this error

Search the MSDN Forums for posts related to this error

Invalid cast from 'System.Int32' to 'System.Windows.Forms.AutoScaleMode'.

Instances of this error (1)

  1. Show Call Stack

at System.Convert.DefaultToType(IConvertible value, Type targetType, IFormatProvider provider) at System.Int32.System.IConvertible.ToType(Type type, IFormatProvider provider) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializePropertyAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement, CodePropertyReferenceExpression propertyReferenceEx, Boolean reportError) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)

Help with this error

MSDN Help

Forum posts about this error

Search the MSDN Forums for posts related to this error

asked Feb 10 at 07:17

Mahesh's gravatar image

Mahesh
11


The designer expects the code to be in style that is emitted by the CodeDom mechanism, so you often need to fix it up (a little) by hand to allow the designer to reload it.

answered Feb 10 at 10:03

Clive's gravatar image

Clive ♦♦
1.1k5

Dear Clive, I have created a project that has single form and has only one button on form,on click of button i am showing a message. I have created a exe and want to decompile.Reflector decompile it successfully but I am unable to view the page, I am getting the above error. Please describe me taht how could I solve my issue.

(Feb 10 at 19:28) Mahesh

I took a C# Windows Forms project, added a single button and produced an assembly. I then used Reflector to export this as VB. In the resulting project I can successfully click on Form1.vb and this displays fine in the designer. Please can you send me your project to take a look at? Thanks

(Feb 13 at 10:34) Clive ♦♦

Same error here... Any advice? Before this error, when I tried to open a form, I received an error about "AutoScaleMode" so I changed the code from "this.AutoScaleMode = AutoScaleMode.None;" to "this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;" Now I have some error like: - Warning 1 Duplicate declaration of member 'point' - The type 'System.Windows.Forms.Form' has no property named 'InputPanel'

Anyone can help? Ciao

answered Feb 22 at 10:56

slumpolo's gravatar image

slumpolo
1

The Initialize component method needs some fixing up if the original code was Visual Basic. To get a simple example of a Form with a button to work, I had to do two things.

(i) Find code of the following form (in response to errors about a duplicated size2)

 Dim size2 As New Size(&H4B, &H17)
 Me.Button1.Size = size2
 ...
 size2 = New Size(&H11C, &H106)
 Me.ClientSize = size2

and get rid of the multiple uses of size2 by changing the second usage to use a new variable

...
Dim size3 as New Size(&H11C, &H106)
Me.ClientSize = size3

(2) Modify the code that is generated for the fields that hold the items from the Form (in response to errors about a missing property named Button1)

Friend Overridable Property Button1 As Button
<DebuggerNonUserCode> _
Get
   Return Me._Button1
End Get
<MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode> _
Set(ByVal WithEventsValue As Button)
    Me._Button1 = WithEventsValue
End Set
End Property
...
<AccessedThroughProperty("Button1")> _
Private _Button1 As Button

replacing it with

Friend WithEvents Button1 As Button

After doing that I could load the code into the Visual Designer.

answered Feb 23 at 09:02

Clive's gravatar image

Clive ♦♦
1.1k5

Your answer
toggle preview

Follow this question


By Email:

Once you sign in you will be able to subscribe for any updates here


By RSS:

Answers

Answers and Comments

Formatting your answer

  • *Italic*
  • **Bold**
  • ***Bold Italic***
  • Link: [text](http://url.com/ "title")
  • Paragraph: Two line breaks
  • Bulleted list: Paragraph then start line with *
  • Numbered list: Paragraph then start line with 1.
  • Blockquote: Paragraph then start with with >
  • Basic HTML tags are also supported

Asked: Feb 10 at 07:17

Seen: 397 times

Last updated: Feb 23 at 09:02

 

Tags:

×1

Related questions