Share via

Brace matching broken in razor files

Bob Graham 5 Reputation points
2023-02-21T21:52:35.01+00:00

Started with Visual Studio 2022 v. 17.4.4 update. It was working fine before, but now I have wrong color for brace matching in *.js files and no brace matching at all.

Ignore the yellow color, that is from an extension and no, the extension is not the cause.braceMatchBroken

in *.cshtml files

Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other

A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 31,191 Reputation points Microsoft External Staff
    2023-02-22T07:59:44.8133333+00:00

    Hi @Bob Graham

    Welcome to Microsoft Q&A! 

    Please try the following steps:

    1. Update your VS2022 to the latest version
    2. Go to Tools > Options > Environment >Fonts and Colors > click on “UseDefaults
    3. Go to Tools > Options > Environment >Fonts and Colors > Display items: Punctuation > Item foreground: Yellow
    4. Go to Tools > Options > Environment >Fonts and Colors > Display items: Selected Text > Item background: Red 

    User's image

    If it doesn't work, please feel free to let us know.

    Sincerely,

    Anna


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.