How can I get two projects added under a solution?

Rod At Work 866 Reputation points
2021-08-27T19:41:13.927+00:00

I maintain an ASP.NET WebForms app written by someone else years ago. I never met the original coder, so have had to put it together the best I could from various sources. The original developer used a dozen projects for the app in the solution, at least that's what I was able to piece together. He didn't document anything nor was it in source control of any kind. He wrote it using VB.NET.

I started maintaining the app 6 years ago. When I found the pieces which I believe comprise the app I put them into a main folder. I found three solutions, each with its own collection of projects, which comprise the app. Here's a screen capture how things are now configured.

127245-screenshot-2021-08-27-133048.png

The solution in folder DotNetProjects is the solution for the app. Since I did this 6 years ago, I don't remember all the steps I took, but what I believe I did was, within VS 2015 at the time, I did an Add Existing Project to the two projects one in folder DotNetLibraries and Reporting. I had thought that Visual Studio would have copied those projects under DotNetProjects. Today I've learned I was wrong. Instead, the solution file is pointing to NotNetLibraries and Reporting in the location they're in as shown in the screen capture, I'm posting here. The reason I've discovered it is because both DotNetLibraries and Reporting are not in TFS. (We're running TFS 2015 on-prem.) I was trying to get a build & release going for this old app, when I discovered that the Visual Studio Build step can't find those projects.

I believe my reasoning, 6 years ago, was that doing an Add Existing Project would have put them under DotNetProjects. My thinking is wrong, and VS just doesn't do that anyway. Perhaps when using VB.NET to add an existing project to a solution, it just leaves the project in its original location. Whatever the reason, I've got a problem. How do I get DotNetLibraries and Reporting both under DotNetProjects, so that I can do a build on our TFS build server?

Developer technologies | VB
{count} votes

1 answer

Sort by: Most helpful
  1. Sam of Simple Samples 5,546 Reputation points
    2021-08-27T20:12:57.22+00:00

    You say under but it is not clear what you mean. Specifically, I am not sure if you mean subfolders in the file system or if you are referring to projects within a solution, or both.

    So I will try to provide a solution and if it is wrong then hopefully it will help clarify things. In VS you can create an empty solution by going to Other Project Types to create a project. In there there is a template for a Blank Solution. With the blank solution you can add existing projects. If you want the projects to be subfolders of the solution folder in the file system then move or copy each project after you have created the solution. Wherever they are, add them as existing projects.

    Also see Web Application Projects versus Web Site Projects in Visual Studio. Be sure to determine if the website is a Web Application Project or a Web Site Project.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.