36

Just got Visual Studio Express 2012 for Windows Desktop and finding myself overly annoyed that the Solution Explorer doesn't accurately reflect the state of my project. I keep clicking Refresh, but it doesn't actually do anything. Microsoft's rather, uh, verbose explanation of how to use it was no help. Oddly enough, my project does refresh sometimes, but I can't figure out what the cause is. It's definitely not the refresh button.

Here's what my Solution Explorer looks like right now:
my solution explorer
I've deleted a lot of these classes. Things like "Term" are what I typed while in the process of naming a class, but the Solution Explorer shows them as separate classes. Also some of the classes I have aren't showing up.

This whole thing is really messed up, and I'm having trouble visualizing what my project looks like because Solution Explorer doesn't show an up-to-date outline of my classes.

How do I refresh the Solution Explorer?

Community
  • 1
  • 1
Eva
  • 4,397
  • 5
  • 43
  • 65

4 Answers4

79

There's a "show all files" button in the top row of Solution Explorer. Click that and you should see your missing files/folders. Right click and choose "Include in Project".

show all files

Community
  • 1
  • 1
dmathisen
  • 2,269
  • 3
  • 36
  • 63
  • 1
    It's not the files that are missing. It's the classes in a single file that are messed up. – Eva Mar 13 '13 at 23:14
  • 1
    I have a similar problem I think. I reverted a file from Git, but don't see how to refresh that file in VS (2010) – Al Lelopath Mar 24 '14 at 20:14
  • 2
    My answer above didn't work? Clicking "Show All Files", then right click -> "Include in Project"? – dmathisen Mar 25 '14 at 01:27
  • For class details, such as the declaration order of members, toggling Show All Files twice seems to do the trick. – Grault Sep 30 '15 at 19:22
14

Choose the project where you deleted the file and than click on show all files enter image description here

Now you will get excluded/Removed files enter image description here

Right Click > include in project.

Community
  • 1
  • 1
Krishna shidnekoppa
  • 1,011
  • 13
  • 20
  • Sure it does. http://imgur.com/a/z2K2C. Make sure the PROJECT is selected from the top level. It works at the project level, not the entire solution. – dmathisen Jun 06 '17 at 15:11
  • Hello, I think you should remove this answer - since it is the *same* as the previously posted and higher-upvoted answer by dmathisen below. – Don Cheadle Oct 25 '17 at 15:03
5

There is a refresh icon option in the top row of solution explorer.
check the image

Jaffer Wilson
  • 7,029
  • 10
  • 62
  • 139
PK-1825
  • 1,431
  • 19
  • 39
  • 3
    That option has been removed in VS2017 – Donny V. May 04 '18 at 18:06
  • 1
    As of 2018 it's there but doesn't refresh as expected. – josh1978 Jul 13 '18 at 16:23
  • Why was it removed in 2017? It has gone from mine too, but is essential for gulp, etc. – Professor of programming Dec 03 '18 at 16:20
  • Refresh button exists in VS2017, but it is shown when a project or project items are selected - not when a solution or solution folders are selected. It also helps when there is a yellow warning mark on referenced assemblies (also cleaning ReSharper's cache in this case). – Sergey S Mar 05 '19 at 08:36
  • There is no Refresh button on DotNetCore projects I've recently created. Drives me batshit crazy (doesn't matter WHAT you click on before - project, file, folder - NADA - no refresh!). I can create a brand new Core 2.1 project template and, apparently, it is not supported. There must be some secret, hidden, setting that isn't documented solely to drive developers insane - and requires editing an obscure setting buried in a file. (sarcasm) – MC9000 Mar 06 '19 at 06:35
0

I had my project running, and nothing was refreshing. Stopping my project returned fresh files/folders.

Max Alexander Hanna
  • 3,388
  • 1
  • 25
  • 35