Multiple projects in one solution
I haven't been able to figure out how to place several separate projects into one solution. I create a lot of small demo projects that are related to a topic and have been opening them one by one in separate solution files. Someone suggested I combine them into one solution but I don't know how to do it. There is no option in the menu bar for adding a new project.
How can I place (or add) my finished projects into a single solution? Also, I would need to be able to click on each one separately in the Solutions window and start it up independently of the others.
Hello Solitaire,
From a single project solution click on 'File'....Add....New Project...this will add a second project to the existing project and create a solution file. Once the solution file is visible from the solution explorer you can also right click on the solution file to add another project
Edit: Existing Projects: File...Add..Existing Project
In VS solution explorer you can rightclick and add different projects (new/existing)
You should be able to debug by right clicking on the selected project and click on debug.
Solitaire wrote: |
| I created a second project, but I can't get it to run! It will only run the first project. There is no option to start when I right-click the project name. |
|
You will have to individually set the project as the startup project (when right clicking)...or right click on the solution and open properties to setup the start project , dependencies, and build configuration
I did set the startup project to begin with the renamed Module2 instead of Module1, but it still only starts the first project. (For now, I'm working with Console apps.)
Hello once again Solitaire, :)
I have the following in Solution explorer:
Solution 'MyConsoleSolutions'
....ConsoleApplication1
........MyProject
........Module1
....ConsoleApplication2
........MyProject
........Module1
In each module I have the following:
Module Module1
Sub Main()
Dim cki As ConsoleKeyInfo
Console.WriteLine("Hello - ConsoleApplication 1") 'or 2 for app2
Do
cki = Console.ReadKey(True)
Loop While cki.Key <> ConsoleKey.Escape
End Sub
End Module
When I right click on ConsoleApplication1 and bring up the context menu...I select "Set as Startup Project" that projectname is now bolded and when I select run from my tool bar only that project runs...I can then right click on ConsoleApplication2 and "Set as Startup Project" and that project name is now bolded...I then select "F5" (same as Run) and only console application 2 runs
This seems to do what you are requesting...To further help please clarify your problem:)
Thank you! I've got it now.
One more thing - When right-clicking on the project and selecting Debug, it doesn't include the option to Start Without Debugging. Is there any way to add it? Otherwise, I'll just selected the option to Set As Startup Object, which works well enough.