Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual Studio hangs on commenting out lines in Razor view #12

Closed
Fandermill opened this issue Sep 1, 2022 · 4 comments
Closed

Visual Studio hangs on commenting out lines in Razor view #12

Fandermill opened this issue Sep 1, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@Fandermill
Copy link

Describe the bug
Today I installed the extension in my VS2022 (17.3.3) and all worked fine. Until I needed to change and comment out some lines in a Razor view in a ASP.Net Framework MVC project. When typing @*, VS automatically adds *@, but the first time it takes a few seconds. Then, the next time, or the third, VS goes from hanging to freezing.

The Razor view I worked on contains if/else statements and thus multiple braces. Which do not get colored, by the way.

After trying and freezing a couple of times, I disabled the extension and commenting out a line in a Razor view worked again. That's why I'm filing a bug report, because I think this is related to the extension.
Re-enabling the extension and trying again, causes the problem again.

To Reproduce
Steps to reproduce the behavior:

  1. Enable RainbowBraces extension
  2. Open an existing Razor view (cshtml)
  3. Try to comment out a few lines by inserting @* at the start of the line to comment.
  4. Then cut the automatically added *@ and paste it to the end of the line
  5. Repeat 3 & 4 until it hangs and freezes.

Expected behavior
I expected the Razor editor to work as before installing the extension.

@Fandermill Fandermill added the bug Something isn't working label Sep 1, 2022
@madskristensen
Copy link
Owner

madskristensen commented Sep 1, 2022

Does this reproduce with the latest version of the extension? I can't reproduce it and I think it might have been fixed in the latest release.

@ScottDatafest
Copy link

I am also getting an issue with VS freezing when RainbowBraces is enabled, when opening Razor (cshtml) files. In my case it's happened with various .cshtml files and seems unrelated to comments since I don't have any comments in this particular file.

I'm running version 1.0.18

I'd be happy to supply some examples if it would help.

@madskristensen
Copy link
Owner

@ScottDatafest what .NET version is your project using? Also, are you using the new experimental Razor editor that you have enabled under Preview Features in Tools/Options?

@ScottDatafest
Copy link

ScottDatafest commented Sep 1, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants