I'm in the process of refactoring a project. I've got an entire subfolder which is known to be broken. Is there any declarative way to exclude that folder from the compile temporarily while I test the refactoring thus far?
I realize I could delete the folder, but I'd like to do this through configuration if possible.
You can use the exclude folder option to remove unwanted folders like node_modules or others you don't want to open in Visual Studio Code. To exclude a folder, go to File > Preferences, and search for file. exclude in the search settings. You can add the pattern of the folder you don't want Visual Studio Code to open.
If you exclude a file from a Web Site project (not Web Application), Visual Studio will simply add the . exclude extension to that file. If you remove the extension, that file will be included again. It's up to you if you still need those files or not.
Yes, there is a button to hide/show excluded files. The button is under solution explorer tab. Important Update: After trials on VS2012 I found out that if you create New Web Site the hide/show button will not appear for no apparent reason.
Persistent Exclusions From menu choose File ➡️ Preferences ➡️ Settings ➡️ User/Workspace Settings and filter default settings to search . You can modify the search. exclude setting (copy from default setting to your user or workspace settings). That will apply only to searches.
You could set the Build Action (in the Properties Window) to None for the files you want excluded. You could also right-click on the folder and choose Exclude from Project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With