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?