20

So I just performed the coup de gras on my project by accidentally clicking on Exclude From Project instead of Add on my controllers folder.

When trying to add a folder named Controllers I get the error "this folder exists". However, If I try to click on the project -> Add Existing... I cannot select a folder, but only the controllers.

Kind of at a loss here, has anyone had experience with this, or does anyone know how to get the folders back into the solution?

Travis J
  • 81,153
  • 41
  • 202
  • 273

4 Answers4

58

Click on the Show All Files icon in the solution explorer and then simply include the folder:

enter image description here

Darin Dimitrov
  • 1,023,142
  • 271
  • 3,287
  • 2,928
9

Visual Studio Express 2012

Select Your Project Folder Click On "Show All Files" icon to show all Excluded Folders And Files

Click On Show All Files icon to show all Excluded Folders And Files

Then Right Click on Excluded Folder or File and Click on "Include In Project"

enter image description here

Chanuka Asanka
  • 2,798
  • 3
  • 24
  • 36
0

In my ASP.Net Webforms project after excluding the file I could't find it even under 'Show all files', but they were at project folder so I had to right click on project in Visula Studio then add existing item.

S.A. Khalili
  • 43
  • 1
  • 9
-1

For anyone wanting a different solution, you can also browse to your project in a File Explorer and delete the offending folder (Be sure to copy it somewhere safe first!). Restart Visual Studio and proceed to add the folder as you regularly would.

matthewsheets
  • 4,535
  • 2
  • 15
  • 11