21

Suddenly my solution tab stopped working on my Visual Studio 2013. Even it is existing project or brand new project it does not show files and folders in Solution Explorer. (File is attached)

I tried to reset settings, restarted PC but did not work. http://msdn.microsoft.com/en-us/library/ms247075(v=vs.100).aspx

I did not installed any new extensions recently I was working what ever I had for a while.

Is there anything else I can do?

enter image description here

Update;

I am also getting this weird message when I click options Icon:

enter image description here

Teoman shipahi
  • 47,454
  • 15
  • 134
  • 158
  • 2
    Check this out: http://www.hjerpbakk.com/blog/2014/7/25/no-content-in-solution-explorer-using-visual-studio-2013. To quote... "This issue is because of a MEF cache corruption. Installing the feedback extension (or installing any extension) will invalidate the cache causing VS to rebuild it." – RizJa Nov 13 '14 at 15:31
  • Thanks for redirection, works now! I think you can post your comment as an answer which is totally working now :) – Teoman shipahi Nov 13 '14 at 15:38
  • Glad I could help! I'll post the comment as answer. – RizJa Nov 13 '14 at 15:39
  • Related - https://stackoverflow.com/questions/32540237/visual-studio-2015-missing-content-in-solution-explorer-branches – vapcguy Oct 25 '17 at 06:02

11 Answers11

16

Check this out: http://www.hjerpbakk.com/blog/2014/7/25/no-content-in-solution-explorer-using-visual-studio-2013

To quote... "This issue is because of a MEF cache corruption. Installing the feedback extension (or installing any extension) will invalidate the cache causing VS to rebuild it."

Link to bug report: https://connect.microsoft.com/VisualStudio/feedback/details/794111/no-exports-were-found-that-match-the-constraint-contract-name

RizJa
  • 1,961
  • 1
  • 21
  • 38
  • 1
    Personally, rather than install an unwanted extension, I just updated an extension on the update list (I generally have at least one item that needs updating!). That work as well. – Vman Dec 01 '15 at 11:49
  • You might consider installing this extension: https://marketplace.visualstudio.com/items?itemName=MadsKristensen.ClearMEFComponentCache – Astrophe Aug 19 '21 at 13:48
13

Just to get the answer here on the same page as the question: users should install (or uninstall) an extension to Visual Studio as this will force a rebuild of the MEF cache. The linked article suggested installing the Microsoft Visual Studio 2013 Feedback Tool extension, which I did do and it worked, but any extension installed through the Tools, Extensions and Updates menu would probably do the job.

I think the cause of this might have been related to an overzealous anti-virus program, but I can't say for sure.

MalcLear
  • 1,124
  • 1
  • 10
  • 21
  • When I followed this advice, I got a popup: "No exports were found that match the constraint contract name" and could not proceed. Searching on that message lead me to [the recommendation to delete the VS Component Model folder](https://stackoverflow.com/questions/17596543/error-message-no-exports-were-found-that-match-the-constraint-contract-name), which resolved all problems for me. – pixelgrease Jan 12 '22 at 18:06
12

Rebuilding didn't work for me, and I wasn't keen on installing another extension.

Got it to work in the following three steps:

  1. Click "Show All Files" in solution explorer (in bar above search bar) Image showing location of Show All Files
  2. Right click folder that was previously missing, select "Include In Project"
  3. Click (unselect) "Show All Files" in solution explorer.
keipala
  • 768
  • 2
  • 7
  • 19
BoxChop
  • 121
  • 1
  • 4
10

it worked to click "show all files" in the Solution explorer!

huijuanli
  • 101
  • 1
  • 2
2

As this issue is because of a MEF cache corruption. Just delete your .vs folder and re-open your solution.

Abhishek Kanrar
  • 418
  • 4
  • 6
  • Best and quickest way if you don't care about vs config for the local project in that directory. Thanks. – El Sordo Jan 05 '23 at 16:41
2

For future Googlers / related issue in 2023, "Explorer" was not showing up for me in the sidebar at all. No way to view files and folders.

I had to delete the C:\Users\%username%\AppData\Roaming\Code\User\globalStorage folder to get it to show up.

elthwi
  • 659
  • 5
  • 8
1

Even, it will work if you clear your local app data for visual studio. %temp% AppData\Roaming\Microsoft\VisualStudio. %temp% AppData\Local\Microsoft\VisualStudio. Delete the files and restart your visual studio.

0
  1. Copy and paste the folders and files at the project location for integrating the project module and build the project even though namespace has correct. This are the way to resolve

  2. The file/folder is not visible proper so Right-click enter image description here improper visible file/folder and click the Include in Project

  3. Build the project -> If any error occur then it like namespace may be error because copy from one project to another project or else same project with different location so that check it

  4. If the error like Build action 'Page' is not supported by the specific combination of the project's targets.

  5. Go and resolve by further steps enter image description here

amarnath
  • 785
  • 3
  • 19
  • 23
Swati Ssk
  • 11
  • 2
  • Needs more work/steps. Of course if you copy a XAML page from one project to another, you're going to have namespace issues. I tried pulling in another page into a project where it was not reading files below the first folder level. If I added it to the project root, it added fine. If I added it to a folder, it could not see the file. So I doubt wherever you put files that the Solution Explorer is going to miraculously pick them up - you have to tell it to load them by doing "Add Existing Item" in VS and point at them. – vapcguy Oct 25 '17 at 01:25
  • As FYI for any that are curious, I solved my issue by ensuring that I could open folders in Solution Explorer and see subitems from another project in a separate VS, so I knew I didn't have a VS-wide problem. So I just re-created a new project and moved my files into them, created new references again, etc. But then it started again after building my project. So I had files in multiple namespaces. Once I got them all in one namespace and restarted VS, everything worked again. – vapcguy Oct 25 '17 at 05:59
0

This worked for me:

  1. Right-click on the project
  2. Rebuild
0

with VS 2022 most of you must be trying to create a .NET 6 framework solutions. But you need to install the .NET 6 sdk separately for your projects to be listed under solution.

Installing .NET 6 SDK, resolved my issue.

-2

Open the Solution Explorer and click on Show All Files Button, it will show the files which were there in your project and you were unable to see them. Then if you want to include them in your project, select the folder and right-click on it and select Include in the project.

Nupur
  • 17
  • 1
  • Sorry, @Nupur, it would be nice if that was working in the case of the original poster's circumstance, but it's clearly not. – vapcguy Oct 25 '17 at 00:56