New Version of Custom Control Not Seen by Designer (but page sees it)

New Version of Custom Control Not Seen by Designer (but page sees it)

Post by John Saund » Tue, 15 Jul 2003 05:49:36


I could swear I've seen this work for other controls:

I've got two instances of devenv running. One has the solution containing my
custom controls. The other has the solution containing the page which uses
the custom controls (call that instance P.sln).

Now, when the custom control is modified (for instance, if I add a
property), and then built, it's natural that P.sln doesn't see the change.
But I could swear I've seen it where building the P.sln solution _does_ see
the change in the designer. Certainly if I execute the page, the new
property takes effect.

Exiting the P.sln instance and restarting devenv on that solution shows the
changes.

For other reasons, I was curious about the html being generated at
design-time, so I added "Debug.WriteLine(designTimeHtml)" to the designer
then debugged the P.sln instance from a third instance of devenv. In
addition to showing me the design-time HTML, it showed me "AppDomain:
loading Assembly.dll" messages when I did a build in the P.sln instance. I
notice that the assembly containing my custom control is _not_ reloaded at
that time, and in fact, _none_ of the out-of-solution assemblies are
reloaded.

Could I be doing something wrong in my control or its designer? There's only
one other thing happening at design-time which looks like it could be my
bug, and I don't see how that's related (I'll post that on another thread).
Should I be releasing something to permit devenv to release the designer
instance? I don't see that my designer is holding on to anything - it does
little more than catch exceptions in GetDesignTimeHtml and do
"CreatePlaceHolderDesignTimeHtml(ex.ToString());".

Thanks,
John Saunders
XXXX@XXXXX.COM
 
 
 

New Version of Custom Control Not Seen by Designer (but page sees it)

Post by John Saund » Thu, 17 Jul 2003 10:48:04

Thanks, Earl, I'll give your suggestion a try.

Would this behavior be by design, or would it be a bug or unfortunate
deficiency?

John Saunders
XXXX@XXXXX.COM

*** Sent via Developersdex http://www.yqcomputer.com/ ***
Don't just participate in USENET...get rewarded for it!

 
 
 

New Version of Custom Control Not Seen by Designer (but page sees it)

Post by earl » Fri, 18 Jul 2003 04:03:44

Hi John,

I believe that this is by design and probably unfortunate as well. I don't
believe that the IDE will look at the original reference'd component for
newer versions.

Thanks,
Earl Beaman
Microsoft, ASP.NET

This posting is provided "AS IS", with no warranties, and confers no
rights.
 
 
 

New Version of Custom Control Not Seen by Designer (but page sees it)

Post by John Saund » Fri, 18 Jul 2003 20:01:00

Thanks again, Earl,

If I were to ask for an enhancement, I would say, perhaps components like
the designers, which depend on references, should be informable about
changes to the referenced items. They could then unload and reload their
copies of the components in the referenced assemblies.

I had been thinking that since I had just done a build of the referencing
project, and since the compiler had just copied a new version of the
referenced assembly to my bin\ directory, that the designer should realize
it's time for a change. I had to remind myself that the designer is using
the referenced assembly, which doesn't change unless that assembly is being
developed by the same person using it, a rare occurrence.

Alternatively, a "refresh reference" context-menu item on the reference
could do the same trick you mentioned, just more neatly.

Thanks again.

John Saunders
XXXX@XXXXX.COM

P.S. I haven't had a chance to try your suggestion yet. I will soon.



don't