Funny Error

Hello, I got this error when I try to view my form in designer mode:

The name 'components' is already used by another object.
Hide

at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.SetName(Object instance, String name)
at System.ComponentModel.Design.Serialization.ContainerCodeDomSerializer.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)
I don't know how this would have occured. It was working fine about ten minutes
ago




Answer this question

Funny Error

  • chrw

    It's a recurring bug in Visual Studio 2005. It even has a name: WSOD. "White Screen of Darn"

    If you can get it to reproduce with documentable steps, you should open a bug under Product Feedback so that we can get this puppy fixed for SP1.

    Brian


  • Manish Agarwal

    Perhaps you have two member objects and have set their Name properties to the same name

  • Mark.Stockton

    Nevermind, all I had to do was rebuild my solution. Why that error happened is beyond me though

  • chanmm

    It's strange though because I can still build and run my application. The only thing is that I can't see my form in the design mode.

  • Syed Zohaib Ali

    I have a similar error, I did a bugreport. I also found a workarround. It happens quiet often, so it's teasing my visual studio experience.

    url: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx FeedbackID=240129

    workarround:

    the error msg is correct, you will find the following in the designer file of the form
    private void InitializeComponent()
    {
    this.components = new System.ComponentModel.Container();
    this.components = new System.ComponentModel.Container();
    System.ComponentModel.ComponentResourceManager resources = new Syste...
    As you can see you this.components appears 2 times. Remove one and reopen the design view fixes the problem.


  • Funny Error