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. VS2008: 2 Projects in One Soltution, sharing UserControls ?

VS2008: 2 Projects in One Soltution, sharing UserControls ?

Scheduled Pinned Locked Moved C#
winformshelpquestion
4 Posts 2 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.
  • S Offline
    S Offline
    sodevrom
    wrote on last edited by
    #1

    Hello, I have a solution file in which I have 2 projects. I have one main project that contains about 15 user controls (each user control is a different "mini software"). Now, I have the other project, and I want to add a user control from the first project in the second one. How can this be done ? In the first project, I see all the user controls from this project. When I open a form from the second project, the user controls are gone from the toolbox. I want them to stay there so I can use them. Hope someone can help. Thanks, Vlad

    N 1 Reply Last reply
    0
    • S sodevrom

      Hello, I have a solution file in which I have 2 projects. I have one main project that contains about 15 user controls (each user control is a different "mini software"). Now, I have the other project, and I want to add a user control from the first project in the second one. How can this be done ? In the first project, I see all the user controls from this project. When I open a form from the second project, the user controls are gone from the toolbox. I want them to stay there so I can use them. Hope someone can help. Thanks, Vlad

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      Do you have reference to the main project from the second one?

      Best wishes, Navaneeth

      S 2 Replies Last reply
      0
      • N N a v a n e e t h

        Do you have reference to the main project from the second one?

        Best wishes, Navaneeth

        S Offline
        S Offline
        sodevrom
        wrote on last edited by
        #3

        Hello, Yes, I added the reference in the second project. I created a new group in the toolbox called "Project1". I than chosen the UserControls I want to add in the toolbox but it does not add them. Any other ideeas ? Thanks

        1 Reply Last reply
        0
        • N N a v a n e e t h

          Do you have reference to the main project from the second one?

          Best wishes, Navaneeth

          S Offline
          S Offline
          sodevrom
          wrote on last edited by
          #4

          I didn't manage to add it in the toolbox, but that's not a big problem. The main problem is that I can't create a user control from Project1 in Project2. I have user control with the name uUserC. I see the class in Project2 and I do this: uUserC c=new uUserC(); When I do this, I get this error: "Unhalted exception has occurec in your app..... Could not load file or assembly 'Project1.Version=1.0.0.0 ....' or one of its dependencies. An attempt was made to load the program with an incorrect format" What can this be ? Thanks, Vlad

          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