BUG: "Could not be loaded" error occurs when you add a .NET UserControl control to a form (322730)
The information in this article applies to:
- Microsoft Visual Studio .NET (2003), Professional Edition
- Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2003), Academic Edition
- Microsoft Visual Studio .NET (2002), Professional Edition
- Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2002), Academic Edition
This article was previously published under Q322730 SYMPTOMS When you try to add an instance of a .NET UserControl control to a form, you may receive the following error message:
The user control
'WindowsControlLibrary1.UserControl1'
could not be loaded. Ensure that the library containing the control has been
built and a project reference has been made to the library containing 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. CAUSE This error may occur because of the reasons that are stated
in the error message. However, this error may also occur if the path to the
location from which the UserControl project was opened contains a number sign (#). For example, you
receive the error message that is listed in the "Symptoms" section if the path
for the UserControl project is C:\My Documents\VC#. RESOLUTION Use one of the following three methods to resolve this
problem. Method 1 Rename the folder or the folders that contain the number sign
(#). Method 2 "Alias" the folder by sharing it, and then give the share a name
that does not contain a number sign (#).
For example, if your
computer name is MyComputer, and if the project is located in the C:\My
Documents\VC# folder, create a network share for this folder, and then name the
share VCSharp. Open the project from the
\\MyComputer\VCSharp share instead of the C:\My Documents\VC# folder. Method 3 If the UserControl project does not have to be loaded as part of the current
solution, remove the project from the solution, and then reference the compiled
user control DLL directly. STATUSMicrosoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
Modification Type: | Minor | Last Reviewed: | 2/17/2006 |
---|
Keywords: | kbvs2005swept kbvs2005doesnotapply kbvs2002sp1sweep kbbug kbnofix KB322730 |
---|
|