How To ReInclude Excluded Folder

2019-04-19 04:14发布

问题:

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?

回答1:

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



回答2:

Visual Studio Express 2012

Select Your Project Folder 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"



回答3:

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.



回答4:

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.