Closed Ayymoss closed 11 months ago
Thanks for reaching out. Does your project build without errors when you do so via the command line (dotnet build
)?
Hi @Ayymoss. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
Hi, thanks for your reply. I probably should have checked that.
It seems to be a visual-only problem. Maybe specific to Rider?
D:\Users\Amos\Desktop\test>dotnet new blazor --interactivity auto
The template "Blazor Web App" was created successfully.
This template contains technologies from parties other than Microsoft, see https://aka.ms/aspnetcore/8.0-third-party-notices for details.
Processing post-creation actions...
Restoring D:\Users\Amos\Desktop\test\test.sln:
Determining projects to restore...
Restored D:\Users\Amos\Desktop\test\test\test.csproj (in 215 ms).
Restored D:\Users\Amos\Desktop\test\test.Client\test.Client.csproj (in 215 ms).
Restore succeeded.
D:\Users\Amos\Desktop\test>dotnet build
MSBuild version 17.8.3+195e7f5a3 for .NET
Determining projects to restore...
All projects are up-to-date for restore.
test.Client -> D:\Users\Amos\Desktop\test\test.Client\bin\Debug\net8.0\test.Client.dll
test.Client (Blazor output) -> D:\Users\Amos\Desktop\test\test.Client\bin\Debug\net8.0\wwwroot
test -> D:\Users\Amos\Desktop\test\test\bin\Debug\net8.0\test.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:00.93
D:\Users\Amos\Desktop\test>
Im experiencing this too, using JetBrains Rider 2023.3 EAP 7.
The project builds and i am able to debug from inside Rider without issues so it is only a visual issue.
I tried to open the same Blazor project in VS-Code with the C# Dev Kit
plugin and experienced no issues.
adding this to the _Imports.razor files seemed to fix the problem for me: @using static Microsoft.AspNetCore.Components.Web.RenderMode
Rider IntelliSense is still showing the error but now the solution builds successfully. In the latest VS 2022, the IntelliSense and the build work correctly.
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.
I also created a new project with Visual Studio version 17.8.1 using the "Blazor Web App template with the Interactive Render Mode "WebAssembly" option. When I open the counter component, the @rendermode directive is highlighted in red (see attached screen snapshot).
When I build the solution, VS 2022 displays, "Build Succeeded." When I launch the app and click the Counter button, it increments as expected.
I have the latest release of JetBrains ReSharper 2023.2.3 installed.
I am also facing this same issue in Visual Studio 17.8.1. I also tested it in Visual Studio Preview 17.9.0 Preview 1 but the same problem persistes. I also use Rider and face the same problem their.
I mentioned my issue over to the JetBrains Resharper issue tracker: https://youtrack.jetbrains.com/issue/RSRP-494352
I'd suggest anyone having this issue with Resharper to go over there instead. The latest version of Resharper has this issue, as well as the Early Access Program (EAP) version. So they need to do more work on their end to get this highlighting error issue fixed.
Someone shared a temporary fix if you follow that link and view the comments.
The same issue...
There are a lot of reports here, which is great, bit it's not clear if anyone is having this issue in Visual Studio without Resharper installed?
There are a lot of reports here, which is great, bit it's not clear if anyone is having this issue in Visual Studio without Resharper installed?
Hi David
I have visual studio 2022 17.8.1 and have not installed resharper. and as you see it looks fine
but I am using Rider.
I face this issue in Rider. But I can build and run my project without an issue
PS: Rider IDE has already Resharper built-in
There are a lot of reports here, which is great, bit it's not clear if anyone is having this issue in Visual Studio without Resharper installed?
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.
Here is the workaround I'm using in the meantime -> https://youtrack.jetbrains.com/issue/RSRP-494352/Support-rendermode-directive#focus=Comments-27-8415772.0-0
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.
Is there an existing issue for this?
Describe the bug
Building a new Blazor app with
auto
interactivity prompted by --help page returns missing symbol in resulting project.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.