Somanden
Somanden

Reputation: 23

Visual Studio 2019 Blazor serverside project is soooooo slow

I am working on a Blazor project and the texteditor is very very slow when working in the .Razor files. In the .CS, .xml and so on, everything is fine, but in the mixed .Razor it ie. takes up to 3-5 sec. to do a if() {} and I get this:

Screendump link

Does anyone know a trick or a tweek to get the VS 2019 texteditor useful again?

Upvotes: 2

Views: 731

Answers (1)

Peter Morris
Peter Morris

Reputation: 23264

I only use Razor files for rendering the markup. For any logic I create a code behind file by creating a file named MyComponent.Razor.cs

public partial class MyComponent
{
  // Supporting methods etc go here
} 

It's a better experience!

Upvotes: 2

Related Questions