dotnet / razor

Compiler and tooling experience for Razor ASP.NET Core apps in Visual Studio, Visual Studio for Mac, and VS Code.
https://asp.net
MIT License
499 stars 191 forks source link

Missing intellisense in Counter.razor in a Blazor Web App with WebAssembly #9587

Closed vsfeedback closed 10 months ago

vsfeedback commented 11 months ago

This issue has been moved from a ticket on Developer Community.


I'm seeing some intellisense issues in Counter.razor when I create a new Blazor Web App with WebAssembly enabled just after installing VS 17.9 P1:

image.png

Notice the @rendermode isn't colored correctly, and the PageTitle component isn't recognized as a component.

Repro steps:

Expected: Working intellisense Actual: Broken intellisense Workaround: Closing and reopening the file doesn't help. Closing and reopening the project resolved the issue. When I created another project to try to reproduce the issue, it didn't reproduce again. See attached recording.


Original Comments

Feedback Bot on 11/12/2023, 09:29 PM:

(private comment, text removed)


Original Solutions

(no solutions)

danroth27 commented 11 months ago

I hit a similar situation in 17.8.0. I created a new project of the same type and options. In this case I get component intellisense in the client project but not in the server project:

Client - works ✅: image

Server - broken ❌: image

Inspecting the obj folders for both projects, it looks the client project has a project.razor.vs.bin, but the server project doesn't:

Client - works ✅ : image

Server - broken ❌: image

davidwengier commented 10 months ago

This was fixed by https://github.com/dotnet/razor/pull/9634