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 / Windows Forms / Design Time / January 2007

Tip: Looking for answers? Try searching our database.

Designer load error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Daniel Billingsley - 17 Dec 2006 19:50 GMT
Ok, spending an hour a day doing the exit VS -> restart VS -> rebuild
project dance is getting REALLY old.

I have a perfectly good user control that I work in for an hour.  I close
Visual Studio for whatever reason and start it back up to continue working
on the control only to be greeted with a nice error telling me the designer
can't find the file or assembly suchandsuch.dll.

I am editing a user control (CustomerEdit.cs) that contains another user
control (AddressEdit.cs).  The error message references the embedded user
control and says it can't find the file or assembly that I used as the
DataSource on a BindingSource on AddressEdit.

There in fact isn't anything wrong with the references since I did nothing
since the last time it was working perfectly fine and the application will
still run perfectly fine in the debugger - it's just the forms designer
that's choking.

Finding the right magical combination of rebuilding the application in
between exit and restart of Visual Studio eventually does the trick, but as
there's no consistent pattern to that "fix" it literally eats up over an
hour a day.  I've had this same error in several other cases.  Usually if I
close the form in the designer before exiting VS I avoid this problem, but
even that isn't foolproof.

Am I the only one experiencing this fragility?
Sugandh Jain - 22 Dec 2006 13:25 GMT
No you are not alone.

One reason for this is that you might be doing some coding to populate or
initialize data in the AddressEdit.cs Control or the parent, CustomerEdit.cs
controls Constructor or the Control_initialize event.

Make a method for this initialization code for the control, and call it on
the specific event on the form where this control resides.

this problem is wierd, but it is tackled like this only. call the
initialization code of the control from some event like form_load ( here
form is the parent form).

Try this, I am hopeful this will help you, please revert if you need more
info..

Regards,
Sugandh

> Ok, spending an hour a day doing the exit VS -> restart VS -> rebuild
> project dance is getting REALLY old.
[quoted text clipped - 22 lines]
>
> Am I the only one experiencing this fragility?
Daniel Billingsley - 17 Jan 2007 18:08 GMT
But wouldn't that always either work or not?  Are you just suggesting that
using the constructor seems to make this issue more common?

> No you are not alone.
>
[quoted text clipped - 41 lines]
>>
>> Am I the only one experiencing this fragility?
Mario Vázquez - 01 Jan 2007 22:05 GMT
Make sure you are adding references using the "Projects" tab in your
solution.

> Ok, spending an hour a day doing the exit VS -> restart VS -> rebuild
> project dance is getting REALLY old.
[quoted text clipped - 22 lines]
>
> Am I the only one experiencing this fragility?

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.