By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,724 Members | 859 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,724 IT Pros & Developers. It's quick & easy.

inherited user control

P: n/a
Hi !

I use VB.Net 2005.
I created an inherited user control based on a previosly created user
control.Everything 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
LoaderExceptions property for more information.
Hide

at System.Reflection.Module.GetTypesInternal(StackCra wlMark&
stackMark)
at System.Reflection.Assembly.GetTypes()
at
Microsoft.VisualStudio.Shell.Design.AssemblyObsole teEventArgs..ctor(Assembly
assembly)
at
Microsoft.VisualStudio.Design.VSDynamicTypeService .ReloadAssemblyIfChanged(S
tring codeBase)
at
Microsoft.VisualStudio.Design.VSDynamicTypeService .CreateDynamicAssembly(Str
ing codeBase)
at
Microsoft.VisualStudio.Design.VSTypeResolutionServ ice.AssemblyEntry.get_Asse
mbly()
at
Microsoft.VisualStudio.Design.VSTypeResolutionServ ice.AssemblyEntry.Search(S
tring fullName, String typeName, Boolean ignoreTypeCase, Assembly& assembly,
String description)
at
Microsoft.VisualStudio.Design.VSTypeResolutionServ ice.SearchProjectEntries(A
ssemblyName assemblyName, String typeName, Boolean ignoreTypeCase, Assembly&
assembly)
at
Microsoft.VisualStudio.Design.VSTypeResolutionServ ice.GetType(String
typeName, Boolean throwOnError, Boolean ignoreCase, ReferenceType refType)
at
Microsoft.VisualStudio.Design.Serialization.CodeDo m.AggregateTypeResolutionS
ervice.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
at
Microsoft.VisualStudio.Design.Serialization.CodeDo m.AggregateTypeResolutionS
ervice.GetType(String name)
at
System.ComponentModel.Design.DesignerHost.System.C omponentModel.Design.IDesi
gnerHost.GetType(String typeName)
at
System.ComponentModel.Design.Serialization.CodeDom DesignerLoader.EnsureDocum
ent(IDesignerSerializationManager manager)
at
System.ComponentModel.Design.Serialization.CodeDom DesignerLoader.PerformLoad
(IDesignerSerializationManager manager)
at
Microsoft.VisualStudio.Design.Serialization.CodeDo m.VSCodeDomDesignerLoader.
PerformLoad(IDesignerSerializationManager serializationManager)
at
System.ComponentModel.Design.Serialization.BasicDe signerLoader.BeginLoad(IDe
signerLoaderHost 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

Jan 4 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On 2007-01-04, Mihai <bv*****@telus.netwrote:
Hi !

I use VB.Net 2005.
I created an inherited user control based on a previosly created user
control.Everything 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
LoaderExceptions property for more information.
Hide

at System.Reflection.Module.GetTypesInternal(StackCra wlMark&
stackMark)
at System.Reflection.Assembly.GetTypes()
at
Microsoft.VisualStudio.Shell.Design.AssemblyObsole teEventArgs..ctor(Assembly
assembly)
at
Microsoft.VisualStudio.Design.VSDynamicTypeService .ReloadAssemblyIfChanged(S
tring codeBase)
at
Microsoft.VisualStudio.Design.VSDynamicTypeService .CreateDynamicAssembly(Str
ing codeBase)
at
Microsoft.VisualStudio.Design.VSTypeResolutionServ ice.AssemblyEntry.get_Asse
mbly()
at
Microsoft.VisualStudio.Design.VSTypeResolutionServ ice.AssemblyEntry.Search(S
tring fullName, String typeName, Boolean ignoreTypeCase, Assembly& assembly,
String description)
at
Microsoft.VisualStudio.Design.VSTypeResolutionServ ice.SearchProjectEntries(A
ssemblyName assemblyName, String typeName, Boolean ignoreTypeCase, Assembly&
assembly)
at
Microsoft.VisualStudio.Design.VSTypeResolutionServ ice.GetType(String
typeName, Boolean throwOnError, Boolean ignoreCase, ReferenceType refType)
at
Microsoft.VisualStudio.Design.Serialization.CodeDo m.AggregateTypeResolutionS
ervice.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
at
Microsoft.VisualStudio.Design.Serialization.CodeDo m.AggregateTypeResolutionS
ervice.GetType(String name)
at
System.ComponentModel.Design.DesignerHost.System.C omponentModel.Design.IDesi
gnerHost.GetType(String typeName)
at
System.ComponentModel.Design.Serialization.CodeDom DesignerLoader.EnsureDocum
ent(IDesignerSerializationManager manager)
at
System.ComponentModel.Design.Serialization.CodeDom DesignerLoader.PerformLoad
(IDesignerSerializationManager manager)
at
Microsoft.VisualStudio.Design.Serialization.CodeDo m.VSCodeDomDesignerLoader.
PerformLoad(IDesignerSerializationManager serializationManager)
at
System.ComponentModel.Design.Serialization.BasicDe signerLoader.BeginLoad(IDe
signerLoaderHost 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
Jan 4 '07 #2

P: n/a
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" <to*********@comcastXXXXXXX.netwrote in message
news:yI******************************@comcast.com. ..
On 2007-01-04, Mihai <bv*****@telus.netwrote:
Hi !

I use VB.Net 2005.
I created an inherited user control based on a previosly created user
control.Everything 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
LoaderExceptions property for more information.
Hide

at System.Reflection.Module.GetTypesInternal(StackCra wlMark&
stackMark)
at System.Reflection.Assembly.GetTypes()
at
Microsoft.VisualStudio.Shell.Design.AssemblyObsole teEventArgs..ctor(Assembly
assembly)
at
Microsoft.VisualStudio.Design.VSDynamicTypeService .ReloadAssemblyIfChanged(S
tring codeBase)
at
Microsoft.VisualStudio.Design.VSDynamicTypeService .CreateDynamicAssembly(Str
ing codeBase)
at
Microsoft.VisualStudio.Design.VSTypeResolutionServ ice.AssemblyEntry.get_Asse
mbly()
at
Microsoft.VisualStudio.Design.VSTypeResolutionServ ice.AssemblyEntry.Search(S
tring fullName, String typeName, Boolean ignoreTypeCase, Assembly&
assembly,
String description)
at
Microsoft.VisualStudio.Design.VSTypeResolutionServ ice.SearchProjectEntries(A
ssemblyName assemblyName, String typeName, Boolean ignoreTypeCase,
Assembly&
assembly)
at
Microsoft.VisualStudio.Design.VSTypeResolutionServ ice.GetType(String
typeName, Boolean throwOnError, Boolean ignoreCase, ReferenceType
refType)
at
Microsoft.VisualStudio.Design.Serialization.CodeDo m.AggregateTypeResolutionS
ervice.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
at
Microsoft.VisualStudio.Design.Serialization.CodeDo m.AggregateTypeResolutionS
ervice.GetType(String name)
at
System.ComponentModel.Design.DesignerHost.System.C omponentModel.Design.IDesi
gnerHost.GetType(String typeName)
at
System.ComponentModel.Design.Serialization.CodeDom DesignerLoader.EnsureDocum
ent(IDesignerSerializationManager manager)
at
System.ComponentModel.Design.Serialization.CodeDom DesignerLoader.PerformLoad
(IDesignerSerializationManager manager)
at
Microsoft.VisualStudio.Design.Serialization.CodeDo m.VSCodeDomDesignerLoader.
PerformLoad(IDesignerSerializationManager serializationManager)
at
System.ComponentModel.Design.Serialization.BasicDe signerLoader.BeginLoad(IDe
signerLoaderHost 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

Jan 5 '07 #3

P: n/a
Hi Again Tom !

I found in MSDN something interesting about this stuff.Have a look at
"Troubleshooting 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" <to*********@comcastXXXXXXX.netwrote in message
news:yI******************************@comcast.com. ..
On 2007-01-04, Mihai <bv*****@telus.netwrote:
Hi !

I use VB.Net 2005.
I created an inherited user control based on a previosly created user
control.Everything 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
LoaderExceptions property for more information.
Hide

at System.Reflection.Module.GetTypesInternal(StackCra wlMark&
stackMark)
at System.Reflection.Assembly.GetTypes()
at
Microsoft.VisualStudio.Shell.Design.AssemblyObsole teEventArgs..ctor(Assembly
assembly)
at
Microsoft.VisualStudio.Design.VSDynamicTypeService .ReloadAssemblyIfChanged(S
tring codeBase)
at
Microsoft.VisualStudio.Design.VSDynamicTypeService .CreateDynamicAssembly(Str
ing codeBase)
at
Microsoft.VisualStudio.Design.VSTypeResolutionServ ice.AssemblyEntry.get_Asse
mbly()
at
Microsoft.VisualStudio.Design.VSTypeResolutionServ ice.AssemblyEntry.Search(S
tring fullName, String typeName, Boolean ignoreTypeCase, Assembly&
assembly,
String description)
at
Microsoft.VisualStudio.Design.VSTypeResolutionServ ice.SearchProjectEntries(A
ssemblyName assemblyName, String typeName, Boolean ignoreTypeCase,
Assembly&
assembly)
at
Microsoft.VisualStudio.Design.VSTypeResolutionServ ice.GetType(String
typeName, Boolean throwOnError, Boolean ignoreCase, ReferenceType
refType)
at
Microsoft.VisualStudio.Design.Serialization.CodeDo m.AggregateTypeResolutionS
ervice.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
at
Microsoft.VisualStudio.Design.Serialization.CodeDo m.AggregateTypeResolutionS
ervice.GetType(String name)
at
System.ComponentModel.Design.DesignerHost.System.C omponentModel.Design.IDesi
gnerHost.GetType(String typeName)
at
System.ComponentModel.Design.Serialization.CodeDom DesignerLoader.EnsureDocum
ent(IDesignerSerializationManager manager)
at
System.ComponentModel.Design.Serialization.CodeDom DesignerLoader.PerformLoad
(IDesignerSerializationManager manager)
at
Microsoft.VisualStudio.Design.Serialization.CodeDo m.VSCodeDomDesignerLoader.
PerformLoad(IDesignerSerializationManager serializationManager)
at
System.ComponentModel.Design.Serialization.BasicDe signerLoader.BeginLoad(IDe
signerLoaderHost 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

Jan 5 '07 #4

P: n/a
Now I have this error for the same scenario :

Could not load file or assembly 'BaseControls, Version=1.0.2560.40871,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system
cannot find the file specified.":"BaseControls, Version=1.0.2560.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" <bv*****@telus.netwrote in message
news:<i9lnh.113192$YV4.98263@edtnps89>...
Hi Again Tom !
>
I found in MSDN something interesting about this stuff.Have a look at
"Troubleshooting 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" <to*********@comcastXXXXXXX.netwrote in message
news:yI******************************@comcast.com. ..
On 2007-01-04, Mihai <bv*****@telus.netwrote:
Hi !
>
I use VB.Net 2005.
I created an inherited user control based on a previosly created
user control.Everything 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 LoaderExceptions property for more information.
Hide
>
at System.Reflection.Module.GetTypesInternal(StackCra wlMark&
stackMark)
at System.Reflection.Assembly.GetTypes()
at
>
>
Microsoft.VisualStudio.Shell.Design.AssemblyObsole teEventArgs..ctor(Assembly
assembly)
at
>
>
Microsoft.VisualStudio.Design.VSDynamicTypeService .ReloadAssemblyIfChanged(S
tring codeBase)
at
>
>
Microsoft.VisualStudio.Design.VSDynamicTypeService .CreateDynamicAssembly(Str
ing codeBase)
at
>
>
Microsoft.VisualStudio.Design.VSTypeResolutionServ ice.AssemblyEntry.get_Asse
mbly()
at
>
>
Microsoft.VisualStudio.Design.VSTypeResolutionServ ice.AssemblyEntry.Search(S
tring fullName, String typeName, Boolean ignoreTypeCase, Assembly&
assembly,
String description)
at
>
>
Microsoft.VisualStudio.Design.VSTypeResolutionServ ice.SearchProjectEntries(A
ssemblyName assemblyName, String typeName, Boolean ignoreTypeCase,
Assembly&
assembly)
at
Microsoft.VisualStudio.Design.VSTypeResolutionServ ice.GetType(Stri
ng typeName, Boolean throwOnError, Boolean ignoreCase,
ReferenceType
refType)
at
>
>
Microsoft.VisualStudio.Design.Serialization.CodeDo m.AggregateTypeResolutionS
ervice.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
at
>
>
Microsoft.VisualStudio.Design.Serialization.CodeDo m.AggregateTypeResolutionS
ervice.GetType(String name)
at
>
>
System.ComponentModel.Design.DesignerHost.System.C omponentModel.Design.IDesi
gnerHost.GetType(String typeName)
at
>
>
System.ComponentModel.Design.Serialization.CodeDom DesignerLoader.EnsureDocum
ent(IDesignerSerializationManager manager)
at
>
>
System.ComponentModel.Design.Serialization.CodeDom DesignerLoader.PerformLoad
(IDesignerSerializationManager manager)
at
>
>
Microsoft.VisualStudio.Design.Serialization.CodeDo m.VSCodeDomDesignerLoader.
PerformLoad(IDesignerSerializationManager serializationManager)
at
>
>
System.ComponentModel.Design.Serialization.BasicDe signerLoader.BeginLoad(IDe
signerLoaderHost 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
>
>

Jan 5 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.