Can't Build Nested User Controls

  • Thread starter Thread starter Charles Law
  • Start date Start date
C

Charles Law

I have a project which contains several user controls, which are nested, for
example MyMainControl, MyControlA. MyControlB. So, MyMainControl has a
MyControlA and MyControlB on it.

When I created the project, I created MyControlA and MyControlB first, and
then built the project. Thereafter, I could drag these onto MyMainControl
and set properties, etc.

As we all know, there is frequently the need in the VS.NET IDE to delete the
bin and obj directories to overcome some nasties. However, having just done
that, I can no longer build my project because it does not exist, and it
effectively contains self-references.

Have I just blown up my project, never to build again, or is there some way
round this?

TIA

Charles
 
I think I have just answered my own question.

Self-references seem to be ok; circular references are not ;-)

Charles
 
Charles Law said:
As we all know, there is frequently the need in the VS.NET IDE to delete the
bin and obj directories to overcome some nasties.

Uhhh... just a comment but do we really all know that? I've never deleted
the bin or obj directory. It sounds like you (and/or others) did it, that
coincidentally whatever was up got fixed and you concluded it is a "need."

If other developers do this routinely I'd like to hear about it but short of
that (while I wouldn't be worried about it) I wouldn't recommend it either.

Tom
 
Hi Tom

Perhaps I was overstating the 'all', but I have, on more than a few
occasions, been advised to delete these two directories by Microsoft tech
support whilst investigating a problem. The 'need' appears to arise, for me
and some others, when a solution contains many projects, and there are
interdependencies.

I wasn't really suggesting that this is an advisable thing to do, but that
it solves some problems where the IDE reports errors erroneously, or will
not build because it maintains that it cannot copy a file because it would
overwrite a target that is in use. Certainly, my preferred solution would be
that the IDE were fixed ;-)

Charles
 
Back
Top