Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / IDE / January 2006

Tip: Looking for answers? Try searching our database.

User Control Designer Errors is VS2005 RC1

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John Mclean - 07 Oct 2005 20:48 GMT
Hi,

We're making extensive use of inherited user controls in our application and
since we converted to RC1 we commonly get the following error when trying to
display the user controls in the designer. We've tried all the usual things
like rebuilding, exiting visual studio, opening ancestor controls in the
designer before opening descendant controls, etc. Sometimes the controls will
load in the designer and sometimes they just won't and I can't seem to put a
pattern to it. I've tried searching for this problem and haven't found
anything that specifically addresses this issue. Is this a known problem? Any
suggestions?

==================================================
Unable to load one or more of the requested types. Retrieve the
LoaderExceptions property for more information.

at System.Reflection.Module.GetTypesInternal(StackCrawlMark& stackMark)
at System.Reflection.Assembly.GetTypes()
at
Microsoft.VisualStudio.Shell.Design.AssemblyObsoleteEventArgs..ctor(Assembly
assembly)
at
Microsoft.VisualStudio.Design.VSDynamicTypeService.ReloadAssemblyIfChanged(String codeBase)
at
Microsoft.VisualStudio.Design.VSDynamicTypeService.CreateDynamicAssembly(String codeBase)
at
Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.get_Assembly()
at
Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.Search(String
fullName, String typeName, Boolean ignoreTypeCase, Assembly& assembly, String
description)
at
Microsoft.VisualStudio.Design.VSTypeResolutionService.SearchProjectEntries(AssemblyName
assemblyName, String typeName, Boolean ignoreTypeCase, Assembly& assembly)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.GetType(String
typeName, Boolean throwOnError, Boolean ignoreCase, ReferenceType refType)
at
Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
at
Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(String name, Boolean throwOnError)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.GetType(ITypeResolutionService trs, String name, Dictionary`2 names)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.FillStatementTable(IDesignerSerializationManager
manager, IDictionary table, Dictionary`2 names, CodeStatementCollection
statements, String className)
at
System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)
at
System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at
Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at
Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)
==================================================

Thanks in advance,
Signature

John Mclean

Drew - 03 Nov 2005 19:25 GMT
I'm getting the same problems with the released version. Any one figure
this out?

> Hi,
>
[quoted text clipped - 53 lines]
>
> Thanks in advance,
elbetzio@gmail.com - 08 Nov 2005 10:52 GMT
I'm having this problem too on the released version. I thought it had
something to do with forms that got migrated from VS2003, but I get
this error every 10 mins when trying to design forms. The solution so
far is to restart VS. Anyone got a more usefull solution?
elbetzio@gmail.com - 08 Nov 2005 11:16 GMT
I may have cracked it...

I believe the problem may be where you're referencing a component in a
form from another assembly (my own in my case) and the version number
changes in the component assembly, possibly due to the automatic
version increment in assemblyInfo.vb - the default.

Try it...i've survived a massive 20 mins so far without restarting VS!
Woo!

[insert obligatory Microsoft flame here]
alon.mayafit@gmail.com - 08 Nov 2005 15:08 GMT
i have the same problm but with a small variation : i have some user
controls that use a c++/cli dll as BL. when i open the VS all the form
that hold these UC don't open and crash. i need to remove the UC from
the left control panel re-add them and recompile the solution(some
times even a restart of the IDE is needed). any suggestions?
Mikhail Arkhipov (Microsoft) - 08 Nov 2005 16:58 GMT
On 11/8/05 3:16, in article
1131448584.497112.114840@g43g2000cwa.googlegroups.com, "elbetzio@gmail.com"

> I may have cracked it...
>
[quoted text clipped - 7 lines]
>
> [insert obligatory Microsoft flame here]

Which error exactly are you getting?

Thanks
Mikhail Arkhipov (Microsoft)
-- This post is provided 'AS IS' with no warranties and confers no rights
elbetzio@gmail.com - 09 Nov 2005 08:19 GMT
Ok, this is the deal...

In Assembly.1 (for the sake of this thread) I have a UserControl in use
in Assembly.2 on a form. When I make modifications to this control in
Assembly.1 and rebuild, the form-designer for the form in Assembly.2
breaks with almost the exact same message as the first post in this
page.

It's because the designer is clearly expecting a specific version
number for Assembly.1 which will change with every new build if the
build-number is not hard-set in AssemblyInfo.vb. Swtiching this to a
static value fixes this problem, I've not had too many more problems
with the new VS apart from this.

-Sam
Jonathan Nix - 25 Jan 2006 01:05 GMT
I was having this exact problem. In my case:
UserControl defined in A.DLL, instantiated / derived from in B.DLL.
UserControl is previously coded.

Same sporadically occuring message as specified in original post.

The fix someone mentioned seems to work for me too!
Hard-code the assembly version in AssemblyInfo.cs:
[assembly: AssemblyVersion("3.1.2")]
(you can still auto-generate that file on production builds with the
appropriate taggings).

This seems like a problem many people are going to encounter.
It's funny how long a programmer will put up with it: Exit VS, re-open it,
etc.

For those whose frustration leads them to flaming... It's understandable,
but be also
fortunate for the amazing things you do have... As JFK said.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.