Skip to content

Razor file got polluted with generated C# content in the middle #11957

@Peter-Juhasz

Description

@Peter-Juhasz

I renamed the embedded (inside the component class) enum type from CreateAlertRuleStep to Step in the code-behind of this Blazor component: AddAlertSinkDialog.razor.cs and ended up with a messed up .razor file.

Somehow the content of the Razor file got deleted halfway, and from line 200 I got a 1000 line of generated code, and then a few lines of Razor at the end of the file.

(Also, as you can see only half of the occurrences got renamed while the other half did not.)

Image

Image

Logs:

[LSP][LanguageServer.Semantic.LSPCSharpSemanticTokensProvider] [14:11:08.0305764] We are behind the C# version which is surprising. Could be an old request that wasn't cancelled, but if not, expect most future requests to fail. We were wanting 55 but C# is at 59.
[LSP][LanguageServer.Semantic.LSPCSharpSemanticTokensProvider] [14:20:57.7551761] We are behind the C# version which is surprising. Could be an old request that wasn't cancelled, but if not, expect most future requests to fail. We were wanting 150 but C# is at 152.

I have never experienced such an issue so far, but it happens. Since I was able to do a global undo, which reverted the rename as well, I guess it was part of the same workspace edit and the root cause was the rename.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions