1

When I open up a pre-existing c# project in Visual Studio 2015 my code doesn't show, I can run the program from Visual Studio but cannot see or edit the code. I've tried repairing and re-installing and nothing seems to work

Guilherme Fidelis
  • 1,022
  • 11
  • 20
lmathurin
  • 103
  • 1
  • 2
  • 6

2 Answers2

1

This error is caused by a corrupted Visual Studio cache.

Close all Visual Studio tasks that are running, and delete all files in the folders ComponentModelCache and MEFCacheBackup

these folders are located in:

\Users\YOUR_USER_PATH\AppData\Local\Microsoft\VisualStudio\YOUR_VISUAL_STUDIO_VERSION

-------------------- This was from the duplicate and it fixed my issue The MEFCacheBackup had files and when removed my VS worked great.

1

I also met the same issue in Visual Studio 2017 and 2019 when I installed the specific font Cascadia Code Microsoft provided.

After I reverted the code font to common used font (such as Consolas), the code can show successfully.

The related settings is below:

enter image description here

If you used an specific font for code, you can also try this method. May it be helpful for you.

Just enjoy.

Bravo Yeung
  • 8,654
  • 5
  • 38
  • 45