Strange form editing bugs

  • Thread starter Thread starter AndrewDucker
  • Start date Start date
A

AndrewDucker

We have a bunch of usercontrols, some of which have problems when you
open them - sometimes for no reason we've been able to track down.

Acting on a tip I read somewhere online, I decided to try running
devenv from another instance of the IDE, set Exception Checking to
break whenever anything was thrown, and see if I could work out what
was causing the IDE to collapse whenever we tried to open these panels.

Lo and behold, they open just fine in the spawned instance of the IDE.
They still won't open in the original instance, but they're fine in the
spawned instance.

Does anyone have _any_ idea why something so strange would be going on?

Cheers,

Andy
 
AndrewDucker,

By open them you mean opening the designer for them? What happens when they
fail to *open*?
 
By open them you mean opening the designer for them?
Yes.

What happens when they fail to *open*?

Rather than display the control it displays the following text:
Unable to load one or more of the requested types. Retrieve the
LoaderExceptions property for more information.
at System.Reflection.Module.GetTypesInternal(StackCrawlMark& stackMark)
(and the rest of the stack)

Unfortunately it doesn't tell me _which_ types it couldn't get, or why.

Andy
 
I'm pretty sure I had a problem where when debugging VS the problem didn't
show up, bit I cannot remember exactly what was the problem. For sure it
wasn't related to the type loadings.

I'm just throwing this out there, but Is it by any chance your control
loading some assemblies dynamically? It might be a problem because VS
designer caches dlls in different place when using them in order not to lock
the assemblies. If the control makes any assumptions regarding the loading
location it might be wrong.
 
Back
Top