• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 544
  • Last Modified:

Adding existing websites and class libraries to visual studio project


I have an existing website and also some class libraries. I now want to have a visual studio project where all these are included so I don't have to open them each and everyone but through the project. How can I do that?

  • 2
1 Solution
Create a new visual studio project - type blank solution. Then once open right click on the solution file in bs and use the add existing project. Repeat for all project. Just a note one the solution is created then go to the physical folder location and past all you project in that folder(each under it's own su folder)
peternordbergAuthor Commented:
HI and thanks for your answer,

I've tried your approach. It worked fine to create the solution as you described. I then copied my folders there and then added an existing website to the solution. But when I did that the soulution file was replaced by the websites directiry information so that the solution looked like a usual website and I can not add any more prjojects to the solution.

What have I done wrong?

Try doing it this way:

Lets assume solution is called: WebSiteSolution, WebSite is called WebSiteProject and Library is called LibraryProject1 and LibraryProject2

1. Open VS and Create a new Solution Project. This should add just a solution file to the ide. Lets assume the sln file is located at %SolutionFolder%\WebSiteSolution.sln.

2. in file explorer go to %SolutionFolder% and past the directories that hold the 3 other projects.

So now you should have in folder %SolutionFolder%  the following:
File: WebSiteSolution.sln
Folder: WebSiteProject
Folder: LibraryProject1
Folder: LibraryProject2

Now in Visual Studio right click on the solution file in the Solution explorer and say add existing project. Add first the project file for LibraryProject1  and then LibraryProject2 and finally right click on the solution folder and click on add existing web site and browse to the WebSiteProject folder.

In the solution explorer you should now see all your porjects.

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now