Undo VS 'Exclude from project'? - visual-studio

Is there a way to undo the 'exclude from project' operation in Visual Studio (2008) ?
How to include files back into the project after excluding them?

Make sure you are showing all files. There is a button at the top of the Solution Explorer called "Show All Files". To see this button, make sure that your project is selected in the solution explorer.
Show All Files
When this option is active, the file should be there, just grayed out. Right click it, and select "Include In Project".
Include In Project

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"

In the absence of an actual undo option you could select Add > Existing Item... to re-add the item you've just excluded.

I couldn't find the "Show All Files" button in Visual Studio 10 when I ran into this problem.
Another way to solve it is to open the containing folder in Windows Explorer by right clicking the folder in Solution Explorer and selecting "Open Folder In Windows Explorer".
Find the folder you want to add back into the project and Drag/Drop it from the Explorer window into your Solution Explorer in Visual Studio.

Add existing will not work if it is a folder that you excluded.

Related

Visual Studio 2015 can't find node_modules after npm i

A folder is not showing up in solution explorer, yet exists on hard drive as part of solution.
When created files through the command line I can't find them in Solution Explorer.
On you solution explorer, click on the "Show All Files" icon, which is the second from the left. Your "missing" files and folders will now show up, but will be grayed out. Right-click on them and select "Include in Project".

Visual Studio 2013 "Show All Files" button is missing

By default Visual Studio organizes my project like this:
However, this view is confusing to me from an organizational perspective as "Source Files" and "Header Files" appear to be folders but are not actual folders on the disk. I read online that there is supposed to be a "Show All Files" button on the Solution Explorer that changes this view but none of my buttons seemed to be labeled that. How can I enable the "Show All Files" view? Sorry if I'm missing something obvious, I'm new to using Visual Studio.
It turns out the issue was that the "Show All Files" button does not appear if you are selecting the Solution itself. If you select an underlying Project, or any of the folders/files in the project, the button will display:
And here is the Solution Explorer view after clicking the button:
Note: see also this post for a solution for Visual Studio 2012, which didn't solve my problem but is closely related.
It didn't work for me, but if it's all about including an existing file to the project, you can copy the file or folder from the Explorer and right click the parent folder (the same folder it exists in) in Visual Studio Solution Explorer and click paste.

How to open project folder from Visual Studio in Windows Explorer?

I'd like to have easy access to my project's folder from within Visual Studio. What do I do to open its folder in Windows Explorer?
Open the Solution Explorer >> right-click your project >> select Open Folder in Windows Explorer.
This has been tested on Visual Studio 2010. It will probably work in any other Visual Studio with a Solution Explorer.
See screenshots:
You can open some of Soluion Explorer's items (folders, projects, solutions) in File Explorer by it's right click menus subitem "Open Folder in File Explorer".
Also you can open opened documents containing folder by right click opened documents tab and "Open Containing Folder".
The easiest way...
I map a key chord to the command
Unfortunately, this only works when a project node is selected, probably because solution folders aren't actually folders and therefore it cannot be guaranteed that they actually match a folder in the file system.
Additionally to the answer opening the solution folder, there is an easy way in adding an open with for single files in the "Solution explorer". Just right click on a file, select Open With..., then Add a new entry:
As arguments you can type /select,%1 which opens the explorer with the current file selected.

Visual Studio 2012 "Show All Files" button missing

In my solution I have three projects: Console application, class library, and a website project.
The Show All Files button is visible on the console and class library project, but soon as I click on the website project the button disappears.
I am running Visual Studio 2012.
I just got the same problem "Solution Explorer toolbar missing" eg. "Show all files". Here's what I did:
Right click your "Solution".
Select "New Solution Explorer View". This will pop-up a new "Solution Explorer" window with toolbars in it.
Close you original "Solution Explorer" window.
Click on folder which must contain target file and Solution explorer properties will be changed. There you can find Refresh button and Show all files button.
Check this post:
Improved Solution Explorer in Visual Studio 2012 to Improve Productivity
"Show All Files" is not shown in a Web Site Project because it's not needed and all files are already shown in the Solution Explorer. I think that this behavior is the same for older versions of VS
In Solution Explorer, click on a project, and then the 'Show All Files' button will appear.
If you are in a WebSite project all files are shown by default. If there are some missing (added during debugging etc), just hit the refresh button on the top of the solution explorer and they should appear.
None of the above answers worked for me. If this is the case for you try right-clicking on any file in your project, then choosing "Show all files". The "Show all files" icon should now appear on this and all subsequent Solution Explorer windows.
YMMV, be kind. :-)
The "Show All Files" auto hides.
Click on the folder that has the hidden file, the button should show up.
By clicking on the project (the folder under the solution) the solution explore checks if all sub folders has hidden file, this will prompt the button to be revealed.
If you want to get Show all file menu just hide the solution explorer and open it fom view=>Other Windows=>Solution Explorer and clik it it will show all files menu
if you click on solution name in "solution explorer" maybe you will can't see "Show all files" button. because maybe added F# or website project in solution.
if you want see "Show all files" button, you must click on project name which is C# or native C++ or C++.net.
try to open any file use ctrl+alt+a . once a file will open "show all" button will appear automatically.

csproj file in solution explorer

It's possible to set *.csproj file visible in Solution Explorer?
Now I use option "Open containing folder" on file from project and search *.csproj. How can I show it in SE? I use Visual Studio 2010 Premium.
Your *.csproj is the project(s) icons that show up below your solution root. You edit the .csproj right clicking the project icon in solution explorer and select properties. What else would you want?
You need to unload the project from solution. After that you can right click and select edit. There should be an extension somewhere that does this. Try PowerCommands. I believe it adds the conveniens button "Edit Project".

Resources