VB.NET - Adding a Project to another Project's Solution

Asked By Eric on 03-Apr-10 02:04 AM
Hi,

I have one project that has 2 classes.  I have another project that has a module.  I want to add the classes project to the module project.  I read online that you right click on the module project and hit add reference.  Then you hit the projects tab and then you add the classes project.  However, I have no projects to select under that tab.  What do I do?  Also, after adding the second project, do I have to do anything special besides compile to get 1 solutions for both projects?

Thanks,

Eric
Anoop S replied to Eric on 03-Apr-10 02:21 AM
click
Project->
Add Existing Item->(in vb6.0- Add Module- in that you can see new and Existing-> click existing )
Browse to the file and select it
then add or open
Mohan Raj Aryal replied to Eric on 03-Apr-10 02:36 AM
First add both projects to a solution. Once you have added multiple projects inside a solution, you can add the reference of one project to another. 

To add project reference in .NET projects, your steps guided by online resources are correct. No other additional steps required.
Eric replied to Mohan Raj Aryal on 03-Apr-10 02:51 AM
ahhh ok.  I guess my question is:  How do I add multiple projects to 1 solution?

Thanks again
Web Star replied to Eric on 03-Apr-10 02:51 AM

For adding one project to another project solution u follows these steps
step 1--Frist open the project in which u want to add another project in your case open Module project

Step 2--Right click on solution in Solution Explorer and than choose Add-->Choose Existing project than Add Existing project dialog box open

step 3-- In Add Existing project dialog box, u can brawose path for another project which u want to add and choose the project file and click on Ok

Step 4-- Now both project are in your one solution than u will be right click on Class project and build it After that right click on Module Project and add referance of Class project to use in that project.

HOpe u got my point

Asked By Eric on 03-Apr-10 03:44 PM
Thank you everyone for your answers.  I have a solution with 2 projects and I have the module project referencing the class project.

I have a follow up question.  The module project takes arguments as strings.  What is the best way to pass the arguments in?  Do I need to create a new project?

Thanks