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 / WinForm Controls / April 2005

Tip: Looking for answers? Try searching our database.

User Controls are dissapearing at designTime

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
roland - 23 Apr 2005 16:07 GMT
I use a lot of user controls embedded in the project itself and often when I
re-open a compiled project in VS.2003 I get an error message that one or
more user controls are not found ( "Could not find type 'xyz'.  Please make
sure that the assembly that contains this type is referenced.  If this type
is a part of your development project, make sure that the project has been
successfully built").Sometimes I can recover by rebuilding the project or
solution, but not always, the effect being that the controls are simply
dropped from the forms). On the toolbar the usercontrol exists and is
available for use. This is most annoying, because I have to put the controls
back on the form(s),etc. Has somebody an explanation of this behaviour and
is there a way to avoid it or correct it? Thanks in advance.
Roland
JosepM - 25 Apr 2005 09:15 GMT
Is the 'bin' directory shared by different projects?

If you have a reference to an assembly in your project that has the 'Copy
local' option set to True, when you delete this reference, Visual Studio
deletes the file... Deleting the reference in a project may cause the file
not to be available to the other projects in the same directory.

> I use a lot of user controls embedded in the project itself and often when I
> re-open a compiled project in VS.2003 I get an error message that one or
[quoted text clipped - 8 lines]
> is there a way to avoid it or correct it? Thanks in advance.
> Roland
roland - 25 Apr 2005 21:38 GMT
Thanks for replying.
No it's not the case. The user control is embedded in the project ( a class
library)  and another project in the solution (an exe) is consuming it. Both
were last succesfully compiled by the commandline compiler. When I got the
problem in the IDE, I could still run the exe accessing the dll and the user
control was still intact. So it's definitely not the case. It is as if the
reference in the project is not pointing anymore to binary .
Roland

> Is the 'bin' directory shared by different projects?
>
[quoted text clipped - 19 lines]
> > is there a way to avoid it or correct it? Thanks in advance.
> > Roland
adam.corbett@gmail.com - 28 Apr 2005 05:31 GMT
This always happens to me as well.  In my experience it happens when
you switch to/from Debug/Release mode.  As a work around, I suggest you
go into configuration manager and set all control projects to compile
to debug when the project is in Release mode.  You might do the
reverse, setting all control projects to always compile to Release
mode.  As long as all control projects always compile to the same
configuration for all project configurations.  When it comes time to
release, then go ahead and set things back to normal before your final
compile.  I do not know if taking similar precautions with the command
line compiler will yield the same results.

The quick fix is simply to close the designer and file of the form you
are editing (with out saving), remove the control project from the
references, and then re-add the project as a reference.  Then compile
once and reopen the form designer.

> Thanks for replying.
> No it's not the case. The user control is embedded in the project ( a class
[quoted text clipped - 32 lines]
> > > is there a way to avoid it or correct it? Thanks in advance.
> > > Roland

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.