Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excluding files in Visual Studio project

I've search everywhere for this, but have yet to find the answer.

I have a VS2012 project with thousands of files and folders I wish to exclude from the project as I don't need them to build any longer. Clicking on the folder and choosing Exclude From Project works, but takes literally forever - at times it appears Visual Studio has stopped running and I have to kill the process.

Question: What is Visual Studio actually doing to exclude a file from a project? Is there a way to simply go into the project file and exclude the files by folder? My project file does not appear to store this information. Where are excluded files defined for the project?

like image 995
iGanja Avatar asked Mar 11 '14 02:03

iGanja


People also ask

How do I exclude a folder in Visual Studio Code?

Exclude folders from file search | Visual Studio Code 1 Go to File -> Preferences -> Settings (or on Mac Code -> Preferences -> Settings) 2 Pick the Workspace tab 3 Filter settings by searching for ‘Search’ 4 Add the files and folder in ‘Search: Exclude’

How to exclude a file from a project?

Right click one of the files and select " Exclude from project", and the file disappears from the project. 3. Click "Show All Files" button on top of Solution Explorer to show all files, but the excluded file is not shown at all. That is the excluded file is not listed with the red minus sign.

Is there a way to show excluded files in vs 2015?

In VS 2015, the Show All Files button does NOT show the excluded files as it did in VS 2013. Does anybody know how to make VS 2015 show excluded files? >>I have excluded a few files from a VC++ project. In VS 2015, the Show All Files button does NOT show the excluded files as it did in VS 2013.

How do I exclude a folder or file from a search?

If you enter ./example, that will match the folder example/ at the top level of your workspace. Use ! to exclude those patterns from the search. !example will skip searching any folder or file named example. Excluded folders can also be added in files.exclude and files.watcherExclude as they might be useful too.


1 Answers

You can open the project file (in s text editor, i.e. Notepad) and remove the lines with the files that you want to exclude.

You can also do that in visual studio but you first need to unload the project (right-click on the project, unload)

like image 168
Z.D. Avatar answered Sep 19 '22 21:09

Z.D.