Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. User Control problems...

User Control problems...

Scheduled Pinned Locked Moved C#
helpcsharpwinformstestingbeta-testing
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    Zombies with Coffee LLC
    wrote on last edited by
    #1

    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!!

    D Z N 3 Replies Last reply
    0
    • Z Zombies with Coffee LLC

      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!!

      D Offline
      D Offline
      David Wengier
      wrote on last edited by
      #2

      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

      Z 1 Reply Last reply
      0
      • D David Wengier

        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

        Z Offline
        Z Offline
        Zombies with Coffee LLC
        wrote on last edited by
        #3

        /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.

        1 Reply Last reply
        0
        • Z Zombies with Coffee LLC

          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!!

          Z Offline
          Z Offline
          Zombies with Coffee LLC
          wrote on last edited by
          #4

          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.

          Z 1 Reply Last reply
          0
          • Z Zombies with Coffee LLC

            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.

            Z Offline
            Z Offline
            Zombies with Coffee LLC
            wrote on last edited by
            #5

            Ok, finally fixed. Uninstalling/Reinstalling does nothing. The uninstall does not affect the registry. Remove key HKEY_CURRENT_USER/Software/Visual Studio

            1 Reply Last reply
            0
            • Z Zombies with Coffee LLC

              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!!

              N Offline
              N Offline
              Neil Van Note
              wrote on last edited by
              #6

              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...

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups