inherited user control

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

    #1

    inherited user control

    Hi !

    I use VB.Net 2005.
    I created an inherited user control based on a previosly created user
    control.Everyth ing is Ok . I can run this control with f5, everything is
    fine. When I close Visual Studio and a open it again and load my project I
    have the error:

    One or 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.

    Unable to load one or more of the requested types. Retrieve the
    LoaderException s property for more information.
    Hide

    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( S
    tring codeBase)
    at
    Microsoft.Visua lStudio.Design. VSDynamicTypeSe rvice.CreateDyn amicAssembly(St r
    ing codeBase)
    at
    Microsoft.Visua lStudio.Design. VSTypeResolutio nService.Assemb lyEntry.get_Ass e
    mbly()
    at
    Microsoft.Visua lStudio.Design. VSTypeResolutio nService.Assemb lyEntry.Search( S
    tring fullName, String typeName, Boolean ignoreTypeCase, Assembly& assembly,
    String description)
    at
    Microsoft.Visua lStudio.Design. VSTypeResolutio nService.Search ProjectEntries( 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 S
    ervice.GetType( String name, Boolean throwOnError, Boolean ignoreCase)
    at
    Microsoft.Visua lStudio.Design. Serialization.C odeDom.Aggregat eTypeResolution S
    ervice.GetType( String name)
    at
    System.Componen tModel.Design.D esignerHost.Sys tem.ComponentMo del.Design.IDes i
    gnerHost.GetTyp e(String typeName)
    at
    System.Componen tModel.Design.S erialization.Co deDomDesignerLo ader.EnsureDocu m
    ent(IDesignerSe rializationMana ger manager)
    at
    System.Componen tModel.Design.S erialization.Co deDomDesignerLo ader.PerformLoa d
    (IDesignerSeria lizationManager manager)
    at
    Microsoft.Visua lStudio.Design. Serialization.C odeDom.VSCodeDo mDesignerLoader .
    PerformLoad(IDe signerSerializa tionManager serializationMa nager)
    at
    System.Componen tModel.Design.S erialization.Ba sicDesignerLoad er.BeginLoad(ID e
    signerLoaderHos t host)



    I rebuid the project but no effect and I cannot load this inherited user
    control. I cannot even see it .
    Any ideas please why is happening ?

    Thank you



  • Tom Shelton

    #2
    Re: inherited user control

    On 2007-01-04, Mihai <bvelicu@telus. netwrote:
    Hi !
    >
    I use VB.Net 2005.
    I created an inherited user control based on a previosly created user
    control.Everyth ing is Ok . I can run this control with f5, everything is
    fine. When I close Visual Studio and a open it again and load my project I
    have the error:
    >
    One or 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.
    >
    Unable to load one or more of the requested types. Retrieve the
    LoaderException s property for more information.
    Hide
    >
    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( S
    tring codeBase)
    at
    Microsoft.Visua lStudio.Design. VSDynamicTypeSe rvice.CreateDyn amicAssembly(St r
    ing codeBase)
    at
    Microsoft.Visua lStudio.Design. VSTypeResolutio nService.Assemb lyEntry.get_Ass e
    mbly()
    at
    Microsoft.Visua lStudio.Design. VSTypeResolutio nService.Assemb lyEntry.Search( S
    tring fullName, String typeName, Boolean ignoreTypeCase, Assembly& assembly,
    String description)
    at
    Microsoft.Visua lStudio.Design. VSTypeResolutio nService.Search ProjectEntries( 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 S
    ervice.GetType( String name, Boolean throwOnError, Boolean ignoreCase)
    at
    Microsoft.Visua lStudio.Design. Serialization.C odeDom.Aggregat eTypeResolution S
    ervice.GetType( String name)
    at
    System.Componen tModel.Design.D esignerHost.Sys tem.ComponentMo del.Design.IDes i
    gnerHost.GetTyp e(String typeName)
    at
    System.Componen tModel.Design.S erialization.Co deDomDesignerLo ader.EnsureDocu m
    ent(IDesignerSe rializationMana ger manager)
    at
    System.Componen tModel.Design.S erialization.Co deDomDesignerLo ader.PerformLoa d
    (IDesignerSeria lizationManager manager)
    at
    Microsoft.Visua lStudio.Design. Serialization.C odeDom.VSCodeDo mDesignerLoader .
    PerformLoad(IDe signerSerializa tionManager serializationMa nager)
    at
    System.Componen tModel.Design.S erialization.Ba sicDesignerLoad er.BeginLoad(ID e
    signerLoaderHos t host)
    >
    >
    >
    I rebuid the project but no effect and I cannot load this inherited user
    control. I cannot even see it .
    Any ideas please why is happening ?
    Are you performing any operations in the load event? Especially, things that
    might error, like db access? If you are, are they surounded with code that
    looks like:

    If Not Me.DesignMode Then
    ' Do Cool Stuff
    End If

    ?

    --
    Tom Shelton

    Comment

    • Mihai

      #3
      Re: inherited user control

      Yes , indeed I have in the Load event of the control some code that get
      something from a Sql server table. I will try what you said
      Thank you !

      "Tom Shelton" <tom_shelton@co mcastXXXXXXX.ne twrote in message
      news:yIqdnb3R8s 6GVQHYnZ2dnUVZ_ h7inZ2d@comcast .com...
      On 2007-01-04, Mihai <bvelicu@telus. netwrote:
      Hi !

      I use VB.Net 2005.
      I created an inherited user control based on a previosly created user
      control.Everyth ing is Ok . I can run this control with f5, everything is
      fine. When I close Visual Studio and a open it again and load my project
      I
      have the error:

      One or 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.

      Unable to load one or more of the requested types. Retrieve the
      LoaderException s property for more information.
      Hide

      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( S
      tring codeBase)
      at
      Microsoft.Visua lStudio.Design. VSDynamicTypeSe rvice.CreateDyn amicAssembly(St r
      ing codeBase)
      at
      Microsoft.Visua lStudio.Design. VSTypeResolutio nService.Assemb lyEntry.get_Ass e
      mbly()
      at
      Microsoft.Visua lStudio.Design. VSTypeResolutio nService.Assemb lyEntry.Search( S
      tring fullName, String typeName, Boolean ignoreTypeCase, Assembly&
      assembly,
      String description)
      at
      Microsoft.Visua lStudio.Design. VSTypeResolutio nService.Search ProjectEntries( 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 S
      ervice.GetType( String name, Boolean throwOnError, Boolean ignoreCase)
      at
      Microsoft.Visua lStudio.Design. Serialization.C odeDom.Aggregat eTypeResolution S
      ervice.GetType( String name)
      at
      System.Componen tModel.Design.D esignerHost.Sys tem.ComponentMo del.Design.IDes i
      gnerHost.GetTyp e(String typeName)
      at
      System.Componen tModel.Design.S erialization.Co deDomDesignerLo ader.EnsureDocu m
      ent(IDesignerSe rializationMana ger manager)
      at
      System.Componen tModel.Design.S erialization.Co deDomDesignerLo ader.PerformLoa d
      (IDesignerSeria lizationManager manager)
      at
      Microsoft.Visua lStudio.Design. Serialization.C odeDom.VSCodeDo mDesignerLoader .
      PerformLoad(IDe signerSerializa tionManager serializationMa nager)
      at
      System.Componen tModel.Design.S erialization.Ba sicDesignerLoad er.BeginLoad(ID e
      signerLoaderHos t host)



      I rebuid the project but no effect and I cannot load this inherited user
      control. I cannot even see it .
      Any ideas please why is happening ?
      >
      Are you performing any operations in the load event? Especially, things
      that
      might error, like db access? If you are, are they surounded with code
      that
      looks like:
      >
      If Not Me.DesignMode Then
      ' Do Cool Stuff
      End If
      >
      ?
      >
      --
      Tom Shelton

      Comment

      • Mihai

        #4
        Re: inherited user control

        Hi Again Tom !

        I found in MSDN something interesting about this stuff.Have a look at
        "Troubleshootin g Inherited Event Handlers in Visual Basic 2005 " .Is work
        how they said . Anyway I will put in code the both methods !

        Regards,
        Mihai


        "Tom Shelton" <tom_shelton@co mcastXXXXXXX.ne twrote in message
        news:yIqdnb3R8s 6GVQHYnZ2dnUVZ_ h7inZ2d@comcast .com...
        On 2007-01-04, Mihai <bvelicu@telus. netwrote:
        Hi !

        I use VB.Net 2005.
        I created an inherited user control based on a previosly created user
        control.Everyth ing is Ok . I can run this control with f5, everything is
        fine. When I close Visual Studio and a open it again and load my project
        I
        have the error:

        One or 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.

        Unable to load one or more of the requested types. Retrieve the
        LoaderException s property for more information.
        Hide

        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( S
        tring codeBase)
        at
        Microsoft.Visua lStudio.Design. VSDynamicTypeSe rvice.CreateDyn amicAssembly(St r
        ing codeBase)
        at
        Microsoft.Visua lStudio.Design. VSTypeResolutio nService.Assemb lyEntry.get_Ass e
        mbly()
        at
        Microsoft.Visua lStudio.Design. VSTypeResolutio nService.Assemb lyEntry.Search( S
        tring fullName, String typeName, Boolean ignoreTypeCase, Assembly&
        assembly,
        String description)
        at
        Microsoft.Visua lStudio.Design. VSTypeResolutio nService.Search ProjectEntries( 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 S
        ervice.GetType( String name, Boolean throwOnError, Boolean ignoreCase)
        at
        Microsoft.Visua lStudio.Design. Serialization.C odeDom.Aggregat eTypeResolution S
        ervice.GetType( String name)
        at
        System.Componen tModel.Design.D esignerHost.Sys tem.ComponentMo del.Design.IDes i
        gnerHost.GetTyp e(String typeName)
        at
        System.Componen tModel.Design.S erialization.Co deDomDesignerLo ader.EnsureDocu m
        ent(IDesignerSe rializationMana ger manager)
        at
        System.Componen tModel.Design.S erialization.Co deDomDesignerLo ader.PerformLoa d
        (IDesignerSeria lizationManager manager)
        at
        Microsoft.Visua lStudio.Design. Serialization.C odeDom.VSCodeDo mDesignerLoader .
        PerformLoad(IDe signerSerializa tionManager serializationMa nager)
        at
        System.Componen tModel.Design.S erialization.Ba sicDesignerLoad er.BeginLoad(ID e
        signerLoaderHos t host)



        I rebuid the project but no effect and I cannot load this inherited user
        control. I cannot even see it .
        Any ideas please why is happening ?
        >
        Are you performing any operations in the load event? Especially, things
        that
        might error, like db access? If you are, are they surounded with code
        that
        looks like:
        >
        If Not Me.DesignMode Then
        ' Do Cool Stuff
        End If
        >
        ?
        >
        --
        Tom Shelton

        Comment

        • Mihai

          #5
          Re: inherited user control

          Now I have this error for the same scenario :

          Could not load file or assembly 'BaseControls, Version=1.0.256 0.40871,
          Culture=neutral , PublicKeyToken= null' or one of its dependencies. The system
          cannot find the file specified.":"Ba seControls, Version=1.0.256 0.40871,
          Culture=neutral , PublicKeyToken= null"}

          This project BaseControls is in the same assemblies as with the others !

          Why Visual Studio cannot find this file ?

          Any ideas ?

          Mihai

          "Mihai" <bvelicu@telus. netwrote in message
          news:<i9lnh.113 192$YV4.98263@e dtnps89>...
          Hi Again Tom !
          >
          I found in MSDN something interesting about this stuff.Have a look at
          "Troubleshootin g Inherited Event Handlers in Visual Basic 2005 " .Is
          work how they said . Anyway I will put in code the both methods !
          >
          Regards,
          Mihai
          >
          >
          "Tom Shelton" <tom_shelton@co mcastXXXXXXX.ne twrote in message
          news:yIqdnb3R8s 6GVQHYnZ2dnUVZ_ h7inZ2d@comcast .com...
          On 2007-01-04, Mihai <bvelicu@telus. netwrote:
          Hi !
          >
          I use VB.Net 2005.
          I created an inherited user control based on a previosly created
          user control.Everyth ing is Ok . I can run this control with f5,
          everything
          is
          fine. When I close Visual Studio and a open it again and load my
          project
          I
          have the error:
          >
          One or 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.
          >
          Unable to load one or more of the requested types. Retrieve
          the LoaderException s property for more information.
          Hide
          >
          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( S
          tring codeBase)
          at
          >
          >
          Microsoft.Visua lStudio.Design. VSDynamicTypeSe rvice.CreateDyn amicAssembly(St r
          ing codeBase)
          at
          >
          >
          Microsoft.Visua lStudio.Design. VSTypeResolutio nService.Assemb lyEntry.get_Ass e
          mbly()
          at
          >
          >
          Microsoft.Visua lStudio.Design. VSTypeResolutio nService.Assemb lyEntry.Search( S
          tring fullName, String typeName, Boolean ignoreTypeCase, Assembly&
          assembly,
          String description)
          at
          >
          >
          Microsoft.Visua lStudio.Design. VSTypeResolutio nService.Search ProjectEntries( A
          ssemblyName assemblyName, String typeName, Boolean ignoreTypeCase,
          Assembly&
          assembly)
          at
          Microsoft.Visua lStudio.Design. VSTypeResolutio nService.GetTyp e(Stri
          ng typeName, Boolean throwOnError, Boolean ignoreCase,
          ReferenceType
          refType)
          at
          >
          >
          Microsoft.Visua lStudio.Design. Serialization.C odeDom.Aggregat eTypeResolution S
          ervice.GetType( String name, Boolean throwOnError, Boolean ignoreCase)
          at
          >
          >
          Microsoft.Visua lStudio.Design. Serialization.C odeDom.Aggregat eTypeResolution S
          ervice.GetType( String name)
          at
          >
          >
          System.Componen tModel.Design.D esignerHost.Sys tem.ComponentMo del.Design.IDes i
          gnerHost.GetTyp e(String typeName)
          at
          >
          >
          System.Componen tModel.Design.S erialization.Co deDomDesignerLo ader.EnsureDocu m
          ent(IDesignerSe rializationMana ger manager)
          at
          >
          >
          System.Componen tModel.Design.S erialization.Co deDomDesignerLo ader.PerformLoa d
          (IDesignerSeria lizationManager manager)
          at
          >
          >
          Microsoft.Visua lStudio.Design. Serialization.C odeDom.VSCodeDo mDesignerLoader .
          PerformLoad(IDe signerSerializa tionManager serializationMa nager)
          at
          >
          >
          System.Componen tModel.Design.S erialization.Ba sicDesignerLoad er.BeginLoad(ID e
          signerLoaderHos t host)
          >
          >
          >
          I rebuid the project but no effect and I cannot load this
          inherited
          user
          control. I cannot even see it .
          Any ideas please why is happening ?
          Are you performing any operations in the load event? Especially,
          things
          that
          might error, like db access? If you are, are they surounded with
          code
          that
          looks like:
          If Not Me.DesignMode Then
          ' Do Cool Stuff
          End If
          ?
          --
          Tom Shelton
          >
          >

          Comment

          Working...