Cincy Steve
Cincy Steve

Reputation: 627

Blazor Component with A Base Component Not Rendering

I have a Blazor Server app that uses 2 nested levels of child components that display in one of the panels of a master layout. Each level of child components inherits a base component for that level. The base components consist of C# code only (no html) and inherit ComponentBase. The inheriting components simply inherit the appropriate base component. This has been working fine for months, but recently the components stopped rendering, perhaps precisely after I upgraded my VS Community 2022 to v17.6.2 (I was distracted at the time and can't be sure of the cause and effect).

Here's the interesting part. If I embed the base component C# code in the inheriting component, rendering comes back, making things appear as the used to. I have been tearing my hair out diagnosing the problem and looking for a solution that doesn't involve replicating the base code. Any thoughts on what might be going on?

I just rolled back to the previous version of VS (v17.5.5) and learned that things worked as they did before. So there's something about the V17.6.2 update that caused the problem. Perhas I have had sime bogus code that VS has just caught or something else is the problem.

Upvotes: 1

Views: 962

Answers (1)

Kebechet
Kebechet

Reputation: 2387

It is known issue present since VS 2022 17.6.0 and it seems to be connected with the new version of .NET SDK:

https://github.com/dotnet/razor/issues/8718

Upvotes: 1

Related Questions