@rendermode InteractiveAuto not found for Blazor .net 8

Rabe, Jens 25 Reputation points

I had a sample application with Blazor and .net 8 and had the following in there:

@attribute [RenderModeInteractiveAuto]

Now, I am supposed to use:

@rendermode InteractiveAuto

But this doesn't compile.

The name 'InteractiveAuto' does not exist in the current context

There does exist InteractiveAutoRenderMode though.

Do I have to take any extra steps? Extra imports?

A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,203 questions
0 comments No comments
{count} votes

Accepted answer
  1. Qing Guo - MSFT 731 Reputation points Microsoft Vendor

    Hi @Rabe, Jens,

    You can check your _Imports.razor file in your .client project, make sure it has this line:

    @using static Microsoft.AspNetCore.Components.Web.RenderMode

    Besides, you can update the Visual Studio to the latest version(my project is 17.9.0 Preview 1.0) , and you can click the Help-->Check for Updates like:


    then the "The name 'InteractiveAuto' does not exist in the current context" will disppear:


    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.

    Best regards,

    Qing Guo

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful