Form designer problem - cannot load a form

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alan T

    Form designer problem - cannot load a form

    I got this kind of error recently:

    When I tried to open a form I got error something like this:
    One of more errors encountered while loading the designer. The errors are
    listed below. Some errors can be fixed by rebuilding your project, while
    others may require code changes.

    Look at the lines all are referencing the system things such as

    at System.Reflecti on.Module.GetTy pesInternal(Sta ckCrawlMark& stackMark)
    at System.Reflecti on.Assembly.Get Types()
    at
    Microsoft.Visua lStudio.Shell.D esign.AssemblyO bsoleteEventArg s..ctor(Assembl y
    assembly)
    at
    Microsoft.Visua lStudio.Design. VSDynamicTypeSe rvice.ReloadAss emblyIfChanged( String
    codeBase)
    at
    Microsoft.Visua lStudio.Design. VSDynamicTypeSe rvice.CreateDyn amicAssembly(St ring
    codeBase)
    at
    Microsoft.Visua lStudio.Design. VSTypeResolutio nService.Assemb lyEntry.get_Ass embly()
    at
    Microsoft.Visua lStudio.Design. VSTypeResolutio nService.Assemb lyEntry.Search( String
    fullName, String typeName, Boolean ignoreTypeCase, Assembly& assembly,
    String description)
    at
    Microsoft.Visua lStudio.Design. VSTypeResolutio nService.Search NormalEntries(A ssemblyName
    assemblyName, String typeName, Boolean ignoreTypeCase, Assembly& assembly)
    at Microsoft.Visua lStudio.Design. VSTypeResolutio nService.GetTyp e(String
    typeName, Boolean throwOnError, Boolean ignoreCase, ReferenceType refType)
    at
    Microsoft.Visua lStudio.Design. Serialization.C odeDom.Aggregat eTypeResolution Service.GetType (String
    name, Boolean throwOnError, Boolean ignoreCase)
    at
    Microsoft.Visua lStudio.Design. Serialization.C odeDom.Aggregat eTypeResolution Service.GetType (String
    name)
    at
    System.Componen tModel.Design.S erialization.De signerSerializa tionManager.Get Type(String
    typeName)
    at
    System.Componen tModel.Design.S erialization.De signerSerializa tionManager.Sys tem.ComponentMo del.Design.Seri alization.IDesi gnerSerializati onManager.GetTy pe(String
    typeName)
    at
    System.Componen tModel.Design.S erialization.Co deDomSerializer Base.Deserializ eExpression(IDe signerSerializa tionManager
    manager, String name, CodeExpression expression)
    at
    System.Componen tModel.Design.S erialization.Co deDomSerializer Base.Deserializ eExpression(IDe signerSerializa tionManager
    manager, String name, CodeExpression expression)
    at
    System.Componen tModel.Design.S erialization.Co deDomSerializer Base.Deserializ eExpression(IDe signerSerializa tionManager
    manager, String name, CodeExpression expression)
    at
    System.Componen tModel.Design.S erialization.Co deDomSerializer Base.Deserializ eExpression(IDe signerSerializa tionManager
    manager, String name, CodeExpression expression)
    at
    System.Componen tModel.Design.S erialization.Co deDomSerializer Base.Deserializ eStatement(IDes ignerSerializat ionManager
    manager, CodeStatement statement)

    Any hints ?


  • Roman Wagner

    #2
    Re: Form designer problem - cannot load a form

    There are some things u can do.

    1.) rebuild the project and try to open the form
    2.) if that fails close VS and open it again
    3.) may be there is a bug inside the serialized data in the resx file.
    4.) u have a property inside a custom control that needs some other
    initialization that the designer can't do

    If you have a problem with designer and serialized properties of
    costomcontrols see the DesignerSeriali zationVisibilit y attribute.

    Comment

    • Alan T

      #3
      Re: Form designer problem - cannot load a form

      Hi,

      I have tried several times say up to 5 or 6 times close solutions, close VS
      and reopen, then it fixed. This error suddenly happened.

      For (3), how to figure out what is the bug if ther is any?
      For (4), how do I know which properties ?

      How to read/see DesignerSeriali zationVisibilit y ?

      This is my situation, in my solution I got several projects (DLL), some DLL
      will be referenced by other DLL projects (added in the references). I first
      encountered it some days ago, then I moved the whole solution in another
      folder, reopen the form with no error. However, then sometime later reopened
      with error again.

      "Roman Wagner" <roman.wagner@g mail.comwrote in message
      news:1163062626 .880914.225970@ h54g2000cwb.goo glegroups.com.. .
      There are some things u can do.
      >
      1.) rebuild the project and try to open the form
      2.) if that fails close VS and open it again
      3.) may be there is a bug inside the serialized data in the resx file.
      4.) u have a property inside a custom control that needs some other
      initialization that the designer can't do
      >
      If you have a problem with designer and serialized properties of
      costomcontrols see the DesignerSeriali zationVisibilit y attribute.
      >

      Comment

      • Roman Wagner

        #4
        Re: Form designer problem - cannot load a form

        Serialzationpro blem: look at the resx file generated from designer and
        search for serealized data.

        If u have a dll that needs an other dll add both to the list of
        references

        Comment

        • Alan T

          #5
          Re: Form designer problem - cannot load a form

          I opened the resx of my form and found only one entry in the table:
          FolderBrowserDi alog.

          Now the situation getting worse, every form in my current project cannot be
          opened, all have errors.
          Other projects in my solution are fine opening the forms with no error.

          "Roman Wagner" <roman.wagner@g mail.comwrote in message
          news:1163073423 .116587.206240@ h48g2000cwc.goo glegroups.com.. .
          Serialzationpro blem: look at the resx file generated from designer and
          search for serealized data.
          >
          If u have a dll that needs an other dll add both to the list of
          references
          >

          Comment

          • Radek Cerny

            #6
            Re: Form designer problem - cannot load a form

            I often get spurious errors; in other threads the cure is to close VS,
            delete the bin and obj folders, open VS, build the project and voila! the
            designer works again. Has never failed me yet.

            "Alan T" <alanpltseNOSPA M@yahoo.com.auw rote in message
            news:OCt9ZVFBHH A.1196@TK2MSFTN GP03.phx.gbl...
            >I opened the resx of my form and found only one entry in the table:
            FolderBrowserDi alog.
            >
            Now the situation getting worse, every form in my current project cannot
            be opened, all have errors.
            Other projects in my solution are fine opening the forms with no error.
            >
            "Roman Wagner" <roman.wagner@g mail.comwrote in message
            news:1163073423 .116587.206240@ h48g2000cwc.goo glegroups.com.. .
            >Serialzationpr oblem: look at the resx file generated from designer and
            >search for serealized data.
            >>
            >If u have a dll that needs an other dll add both to the list of
            >references
            >>
            >
            >

            Comment

            Working...