razor: [Blazor .NET 8] Missing rendermode Symbol in Default Interactivity Auto Template
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
Building a new Blazor app with auto
interactivity prompted by --help page returns missing symbol in resulting project.
-int, --interactivity <None|Server|...> Chooses which interactive render mode to use for interactive components
Type: choice
None No interactivity (static server rendering only)
Server Runs on the server
WebAssembly Runs in the browser using WebAssembly
Auto Uses Server while downloading WebAssembly assets, then uses
WebAssembly
Default: Server
Expected Behavior
For the render mode attribute to correctly work.
Steps To Reproduce
dotnet new blazor --interactivity auto
In the Client -> Counter.razor page -> @rendermode InteractiveAuto
-> “Cannot resolve symbol ‘rendermode’”
Exceptions (if any)
Cannot resolve symbol ‘rendermode’
.NET Version
8.0.100
Anything else?
Using Rider, but I created the template via CLI.
dotnet --info
.NET SDK:
Version: 8.0.100
Commit: 57efcf1350
Workload version: 8.0.100-manifests.6c33ef20
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19045
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\8.0.100\
.NET workloads installed:
Workload version: 8.0.100-manifests.6c33ef20
There are no installed workloads to display.
Host:
Version: 8.0.0
Architecture: x64
Commit: 5535e31a71
.NET SDKs installed:
6.0.414 [C:\Program Files\dotnet\sdk]
8.0.100 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.22 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.22 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.22 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
None
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
About this issue
- Original URL
- State: closed
- Created 8 months ago
- Reactions: 3
- Comments: 15 (4 by maintainers)
Thanks all. I’m going to close this issue, since it’s a Rider/Resharper issue. The YouTrack link above is presumably the best place for updates.
It appears fine in Visual Studio 2022 Version 17.8.1 without Resharper.
Upon installing Resharper 2023.2.3 in Visual Studio, the issue appears.
I just created a new project with the latest updated Visual Studio version using the “Blazor Web App” template with “Auto” interactivity rendering mode and I see the
@using static Microsoft.AspNetCore.Components.Web.RenderMode
line is already specified in the_Imports.razor
file but I still see the error:EDIT: Pretty sure this is a Resharper error.