How to Fix the InvisibleEditor Error in Visual Studio 2022

Sometimes Visual Studio is strange. As I tried to disable a StyleCop rule in Visual Studio 2022, I got this error:

Object name: InvisibleEditor

The rule set file could not be updated.

Cannot access a disposed object.
Object name: ‘InvisibleEditor’

If this error keeps appearing after you close the .editorconfig file, your computer may have some cached data that Visual Studio cannot work with. Go to the folder

%LocalAppData%\Microsoft\Team Foundation\X.0\Cache

and delete all cached files (replace X with every folder you find there).

After restarting Visual Studio, you should be able to make the change that failed before. I noticed that Visual Studio now showed me a configuration dialog for the .editorconfig file instead of the plain text file editor.

I cannot explain what the problem was, but maybe the magic of deleting cached data will solve your problem as well.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.