How to make multiple projects within one solution in Visual Studio 2017

Viewed 423

I have a solution called book_example with one project inside called first_project. I want to make several more example projects called second_project, third_project etc. within this solution.

So, when I open book_example in the solution explorer it would show all of my projects. I want them to share source code so all file paths etc. should be the same.

When I right click the solution Add -> New Project even if I use a template that is exactly the same as my existing first_project all of the paths do not work. Basic things like my source.cpp say "This file does not exist or has been moved".

Edit: To be more clear, when I try a solution like the one proposed by madocter below, I get errors with the project. I.e.:

Error

What is the correct way to create several projects within one solution that share code?

0 Answers
Related