Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2022 .razor code block is flickering

I am using Visual Studio 2022 Enterprise. While working with .razor files I have a strange flickering.

Since a while my syntax highlighting is broken. As you can see in the image below it is a constant flickering of the highlighting. Does anyone knows how to get rid of the flickering in a .razor file in C#. This behavior is occurring in some of the file, not in all.

I have already rebuild and clean up the project. Closing VS or the tab does not work either.

enter image description here

Ignore the code content, that is still in development :)

like image 203
Dominik Avatar asked Jul 02 '26 08:07

Dominik


2 Answers

See this page. A fix for this issue has been released! Install the most recent release from https://visualstudio.microsoft.com/downloads/.

Update to 17.2 can solve the problem.

like image 64
Jingmiao Xu-MSFT Avatar answered Jul 04 '26 21:07

Jingmiao Xu-MSFT


While update 17.2 makes it a little better the workaround for now is to maximize all collapsed code blocks.

like image 39
Christian O. Avatar answered Jul 04 '26 20:07

Christian O.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!