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

Earlz picture Earlz · Jun 16, 2010 · Viewed 11.6k times · Source

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?

Answer

heavyd picture heavyd · Jun 16, 2010

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.