Is there a way to convert a folder to a project in Visual Studio 2012?
Asked Answered
O

1

6

I have a folder with represents the business logic of my application, it contains a list of classes used through my webform application. So i am now changing some of the way the application has been implemented as i have now added a webservice project which will handle all the call to the database via my Data Access Layer. Now i am unsure whether i should leave my Business Logic classes in the Web application project and reference it in my web service project because i want the web service methods to return classes which will be used by the web application. Is there a way to convert a folder to a project so i can include it in the solution as a seperate project.

Ochs answered 21/10, 2014 at 13:6 Comment(0)
C
4

To add folder with files:

  • Copy folder into a new project (near other file which is already in this project);
  • Select that project (or any file inside it);
  • Toggle "Show All Files"

  • You will see dimmed folder;

  • Right click it, "Include In Project".

It should add all files inside that project and choose most appropriate "Build Action". If not, simply open "Properties" window (Alt+Enter) and set "Build Action" individually for each file.

Chrestomathy answered 21/10, 2014 at 14:53 Comment(1)
In addition to the steps in the answer: If it is possible, try to make sure your namespaces are corretly name to reflect the folder structure. It helps later on when looking for classes.Ponderous

© 2022 - 2024 — McMap. All rights reserved.