Arefi Clayton
Arefi Clayton

Reputation: 851

Code editor appears blank

I was using ReSharper with visual studio 2015 and my pc got really slow because of ReSharper and i had to uninstall it. After uninstallation completed when i opened up my project the only thing i saw was a blank screen like this.like this

I know that uninstalling ReSharper caused it and i looked and tried to fix it by changing Text Editor options but nothing worked so far. I've also searched about this issue and nothing came across yet.

Thanks

Upvotes: 52

Views: 24074

Answers (10)

Michael Kruglos
Michael Kruglos

Reputation: 1286

I had the same problem. Tried everything in this thread, and nothing worked.

In the end I solved it by launching Visual Studio Installer, and choosing More -> Repair (see screenshot). Keep in mind that it will reset some settings and will remove all manually installed extensions. That's is a small price to pay to fix the problem IMO.

Needless to say, that old versions of Visual Studio don't have the installer available.

N.B. If you have a fairly recent version of Visual Studio (I think starting from 2017 or so), you do have the installer, even if you're not aware of it. Just search your computer and you will find it.

Visual Studio Installer Interface

Upvotes: 1

Silverstorm
Silverstorm

Reputation: 15835

This error is caused by a corrupted Visual Studio cache.

Close all running Visual Studio tasks, then delete all files in the folders ComponentModelCache and MEFCacheBackup located in:

%LocalAppData%\Microsoft\VisualStudio\<YOUR_VISUAL_STUDIO_VERSION>

Upvotes: 137

Chris Raisin
Chris Raisin

Reputation: 442

I found the following worked:

  1. Right mouse-button click on the VB item for which the code is not being displayed (after noting in properties where it resides)
  2. Select "Exclude from Project"
  3. Right mouse-button click on the Solution/Project root node in the explorer
  4. Select "Add Existing Item" from the context menu that appears
  5. Navigate to that original file excluded in step 2 and select "Add" (or "Link" if it was previously linked in a folder external to your projects main files)
  6. Double left-mouse button click on the newly restored VB file

The code should now appear.

Upvotes: 0

Bravo Yeung
Bravo Yeung

Reputation: 9840

I am faced with the same issue in Visual Studio 2017 and 2019 after I installed the specific font Cascadia Code Microsoft provided for several months.

After I reverted the code font to common used font (such as Consolas), the code came back to show again.

Settings in Visual Studio:

Tools -> Options-> Environment -> Font and Colors

Upvotes: 6

Ben Collins
Ben Collins

Reputation: 484

This happened to me on VS2022 and it was caused by the Cascadia Mono font being corrupted (by Windows update?). Issue also broke VS Code. Explained on this thread.

Upvotes: 14

Aaron Glover
Aaron Glover

Reputation: 1249

I know this is a really old thread. I recently had this problem and found that it was a corrupt font.

In my case I was using Cascadia Code font. uninstalling and reinstalling that font fixed it for me.

Upvotes: 20

Technophile
Technophile

Reputation: 472

Restarting VS (2012, frozen tool set) fixed this in some cases. In others, WINDOW > Reset Window Layout.

Upvotes: 0

Sunday Oladiran
Sunday Oladiran

Reputation: 1

In my case the, reason is the Productivity power tools 2013. I went to extension via Tools -> Extensions and Updates and after downloading and installing the extension, I restarted VS, that got it working again!

Upvotes: 0

EatATaco
EatATaco

Reputation: 709

While I am sure the other answer is correct, I just restarted my VS 2017 in administrator mode, and it fixed the problem.

Upvotes: 0

s.m.
s.m.

Reputation: 8043

In my case the reason, on a VS2013 install, was a temporary glitch in an extension called Productivity Power Tools 2013.

What I did was I disabled it from Tools -> Extensions and Updates. Then I restarted VS, enabled it again, restarted again and bish bash bosh, problem solved.

It's odd because I didn't have to hunt down cache folders to delete, but it did the trick.

Upvotes: 1

Related Questions