User Control problems...
-
Ok, I give up. Was working great on my control, and now I can't get anything but this error message when I try to drag my control onto my test project. > The user control 'Blah' 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. I'm sure it's something TOTALLY simple to fix this, but I'm going insane!! It used to work, and now, nothing!! I've been stuck for 2 days now. // Add a testing project 1) Select File - New - Project - Click 'Windows Application' - Set Name to 'TestMain1' - Click OK. // Create a new control 2) In the 'Solution Explorer', right click "Solution 'TestMain1' (1 project). - Select 'Add - New Project' - Click 'Windows Control Library' - Set Name to 'Test1' - Click OK. // Build... 3) Press F7 to build both projects. // Now add the control to the main project. 4) In the 'Solution Explorer', double-click the file 'Form1.cs' - View the 'Toolbox - Windows Forms' - The bottom of the list should show 'UserControl1' - Click on 'UserControl1' and drag to the form. * Error Message Displays* Can someone please tell me what I am doing wrong in the above situation? I tried completely reinstalling .NET and I have also just updated with SP1. Thanks in Advance!!
-
Ok, I give up. Was working great on my control, and now I can't get anything but this error message when I try to drag my control onto my test project. > The user control 'Blah' 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. I'm sure it's something TOTALLY simple to fix this, but I'm going insane!! It used to work, and now, nothing!! I've been stuck for 2 days now. // Add a testing project 1) Select File - New - Project - Click 'Windows Application' - Set Name to 'TestMain1' - Click OK. // Create a new control 2) In the 'Solution Explorer', right click "Solution 'TestMain1' (1 project). - Select 'Add - New Project' - Click 'Windows Control Library' - Set Name to 'Test1' - Click OK. // Build... 3) Press F7 to build both projects. // Now add the control to the main project. 4) In the 'Solution Explorer', double-click the file 'Form1.cs' - View the 'Toolbox - Windows Forms' - The bottom of the list should show 'UserControl1' - Click on 'UserControl1' and drag to the form. * Error Message Displays* Can someone please tell me what I am doing wrong in the above situation? I tried completely reinstalling .NET and I have also just updated with SP1. Thanks in Advance!!
I think you need to add a reference to the control library from the windows forms application. In solution explorer, right click on "References.." in the windows app, select Add Reference. Change to the Projects tab, and tick the control library. -- David Wengier Sonork ID: 100.14177 - Ch00k
-
I think you need to add a reference to the control library from the windows forms application. In solution explorer, right click on "References.." in the windows app, select Add Reference. Change to the Projects tab, and tick the control library. -- David Wengier Sonork ID: 100.14177 - Ch00k
/nod, the process that I have listed will automatically add the reference. Going ahead and doing it again had no effect. Thanks for the attempt.
-
Ok, I give up. Was working great on my control, and now I can't get anything but this error message when I try to drag my control onto my test project. > The user control 'Blah' 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. I'm sure it's something TOTALLY simple to fix this, but I'm going insane!! It used to work, and now, nothing!! I've been stuck for 2 days now. // Add a testing project 1) Select File - New - Project - Click 'Windows Application' - Set Name to 'TestMain1' - Click OK. // Create a new control 2) In the 'Solution Explorer', right click "Solution 'TestMain1' (1 project). - Select 'Add - New Project' - Click 'Windows Control Library' - Set Name to 'Test1' - Click OK. // Build... 3) Press F7 to build both projects. // Now add the control to the main project. 4) In the 'Solution Explorer', double-click the file 'Form1.cs' - View the 'Toolbox - Windows Forms' - The bottom of the list should show 'UserControl1' - Click on 'UserControl1' and drag to the form. * Error Message Displays* Can someone please tell me what I am doing wrong in the above situation? I tried completely reinstalling .NET and I have also just updated with SP1. Thanks in Advance!!
GRRRRRRr..... This little example I used works FINE at home. Great, that means that something is now corrupt. Going to completely uninstall and reinstall the developer's system.
-
GRRRRRRr..... This little example I used works FINE at home. Great, that means that something is now corrupt. Going to completely uninstall and reinstall the developer's system.
Ok, finally fixed. Uninstalling/Reinstalling does nothing. The uninstall does not affect the registry. Remove key HKEY_CURRENT_USER/Software/Visual Studio
-
Ok, I give up. Was working great on my control, and now I can't get anything but this error message when I try to drag my control onto my test project. > The user control 'Blah' 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. I'm sure it's something TOTALLY simple to fix this, but I'm going insane!! It used to work, and now, nothing!! I've been stuck for 2 days now. // Add a testing project 1) Select File - New - Project - Click 'Windows Application' - Set Name to 'TestMain1' - Click OK. // Create a new control 2) In the 'Solution Explorer', right click "Solution 'TestMain1' (1 project). - Select 'Add - New Project' - Click 'Windows Control Library' - Set Name to 'Test1' - Click OK. // Build... 3) Press F7 to build both projects. // Now add the control to the main project. 4) In the 'Solution Explorer', double-click the file 'Form1.cs' - View the 'Toolbox - Windows Forms' - The bottom of the list should show 'UserControl1' - Click on 'UserControl1' and drag to the form. * Error Message Displays* Can someone please tell me what I am doing wrong in the above situation? I tried completely reinstalling .NET and I have also just updated with SP1. Thanks in Advance!!
Let me guess, The path that you built the control in, contains a # symbol. I ran into that a few days ago. What a pisser...