Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add an existing folder to a Visual Studio project?

I have a web application project made in Visual Studio 2008.

Well, I added a jquery folder and added it to source control and other such things. I forgot to add it to the visual studio project though. How do I add the existing folder now? I've tried just creating a new folder and naming it jquery but it gave me a cryptic error "the directory is already on the disk ... if you want to see this directory then check the Show All Files option in the project file" Yet I looked and saw no such option.

Is the only way around this to rename jquery to jquery2 and then create a new folder via visual studio named jquery and copy all my files into it?

like image 528
Earlz Avatar asked Jun 16 '10 21:06

Earlz


People also ask

How do I add a folder to an existing Visual Studio project?

Adding FilesRight click the project or contained folder and choose Add | Existing Item... . Use Show All Files . Click on files or folders you would like to add to the project and choose Include In Project . Drag and drop files and folders from Windows Explorer.

How do I add a folder to Visual Studio solution?

Just use the context menu for the solution and just below the option of creating a new solution folder you now find 'Add Folder as Solution Folder'. This will create a solution folder with the same name as you selected and add the items inside of that folder to the solution folder. This will not move the files on disk.

How do I add an existing directory to Vscode?

You can use drag and drop to add folders to a workspace. Drag a folder to the File Explorer to add it to the current workspace.


1 Answers

With your project open in Visual Studio, click on your project. Then go to the "Project" menu and select "Show All Files". You should now see any directories or file that are in the directory of the project but not included in the project.

Then, right-click on the folder you want to add, and select "Include in Project" from the context menu.

like image 128
heavyd Avatar answered Oct 11 '22 14:10

heavyd