473,394 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

User Controls disappear

I create a user control (actually a several). Everything
is fine. I use it on a form or two. Everything is fine.
All of a sudden when I make a change and rebuild, it can't
find the control anymore. SAME PROBLEM OCCURS WITH C# OR
VB.NET???????

Error Message:
The user control ... could not be loaded. Ensure that the
library containing the control has been built and a
project reference has been made to the library containg
the control. If you have changed the name of the user
control, close and re-open the control's designer to
update the toolbox item

I didn't do anything that I can figure. The controls are
in the same namespace and project as the mainline.
Nov 15 '05 #1
6 5452
Are your user controls in the same solution as the main project?

Is "Copy Local" set to true for the references?

Can you give more info about "All of a sudden when I make a change and
rebuild"... where is this change made - to the User control or the main
project?

- VJ

"Michael Polen" <mi**@thepolens.com> wrote in message
news:23****************************@phx.gbl...
I create a user control (actually a several). Everything
is fine. I use it on a form or two. Everything is fine.
All of a sudden when I make a change and rebuild, it can't
find the control anymore. SAME PROBLEM OCCURS WITH C# OR
VB.NET???????

Error Message:
The user control ... could not be loaded. Ensure that the
library containing the control has been built and a
project reference has been made to the library containg
the control. If you have changed the name of the user
control, close and re-open the control's designer to
update the toolbox item

I didn't do anything that I can figure. The controls are
in the same namespace and project as the mainline.

Nov 15 '05 #2
1. Yes, the controls are in the same solution.
2. What is "Copy Local?" How do I set it?
3. I can make a change to any of the controls or try to change the main
by just adding a control to it. All of a sudden some or all of my
controls no longer appear in the namespace.
Are your user controls in the same solution as the main >>project? Is "Copy Local" set to true for the references? Can you give more info about "All of a sudden when I make >>a change andrebuild"... where is this change made - to the User >>control or the mainproject? - VJ


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 15 '05 #3
Click on the reference to your user control in your main project, and see
the properties. You'll have a property named "Copy Local". Set it to true.
I'm not sure if this is the problem, but it's worth a try.

Also, do you have the output directory for both the projects set to the same
directory?

- VJ

"Michael Polen" <mi**@thepolens.com> wrote in message
news:Ow**************@TK2MSFTNGP12.phx.gbl...
1. Yes, the controls are in the same solution.
2. What is "Copy Local?" How do I set it?
3. I can make a change to any of the controls or try to change the main
by just adding a control to it. All of a sudden some or all of my
controls no longer appear in the namespace.
Are your user controls in the same solution as the main >>project?Is "Copy Local" set to true for the references?Can you give more info about "All of a sudden when I make >>a change andrebuild"... where is this change made - to the User >>control or the mainproject?- VJ


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

Nov 15 '05 #4
Yes, there is only one directory involved.
I can't find a copy local property anywhere.
Click on the reference to your user control in your main >>project, and seethe properties. You'll have a property named "Copy >>Local". Set it to true.I'm not sure if this is the problem, but it's worth a try.

Mike Polen
4 year of programming experience spread over 4 decades -- who remembers
1401 autocoder?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 15 '05 #5
"Michael Polen" <mi**@thepolens.com> wrote:
I create a user control (actually a several).
[...]
All of a sudden when I make a change and
rebuild, it can't find the control anymore.


When the controls and application are in the same solution, this can happen
if you rebuild the solution and part of the rebuild fails (e.g. a syntax
error). If this is the case, you just have to fix the problem and rebuild
before trying to open any of the forms in design view.

P.

--
www.CL4.org
Nov 15 '05 #6
Paul
That would make sense if I was getting any other errors. Buy the build
says successful with no errors. Sometimes I can't even add the control
to the main form. It acts like it does when you create a new control and
try to add it to the form without first building.

Mike
When the controls and application are in the same solution, this can

happen if you rebuild the solution and part of the rebuild fails (e.g. a
syntax error). If this is the case, you just have to fix the problem and
rebuild before trying to open any of the forms in design view.
<<<

MP
4 year of programming experience spread over 4 decades -- who remembers
1401 autocoder?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 15 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Henke | last post by:
I added a project to my solution that contains a user control. Now I 'd like to add the user control from that project to a form in my solution. The problem is that the control doesn't gets added...
1
by: Peter Manesis | last post by:
I have created some user controls which they inherit from TextBox, ComboBox e.t.c. They seem to work fine but sometimes when I open the project and load the form containing them (or maybe when I...
1
by: Rhy Mednick | last post by:
I'm creating a custom control (inherited from UserControl) that is displayed by other controls on the form. I would like for the control to disappear when the user clicks outside my control the...
10
by: BBM | last post by:
Hi, I have been developing with C# User Controls and occasionally have a problem where I "lose" a control from the design surface of the User Control. The controls that I am using to build my...
0
by: Philippe Meunier | last post by:
Hi, I am building a solution in VB.NET, and one of the project in the solution contains my user controls (and inherited controls), Everything is ok when I just came to add the user control and...
1
by: Philippe Meunier | last post by:
Ok, I already asked a question similar to this one but didn't found any answer ! I've a solution with 2 projects in it. One of the project contains Usercontrols and Inherited Controls. I work...
9
by: Charles Law | last post by:
I have a form on which user controls are placed at runtime. When a control is added to the form a handler is added for an event that a high-level object raises, which must be handled by the new...
3
by: Fred Flintstone | last post by:
I'm a bit confused about something. I have an aspx page populated with dynamic controls; textboxes, labels, radios and so on. On the page is a Yes/No radio combination and 3 textboxes. The...
1
by: weboweb | last post by:
Hello aspnet experts! I have a design question for the more experienced developers (more than me at least :-)). 1) I have a page in the application I'm building that displays a web user...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.