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
502 stars 193 forks source link

All local and 3rd party components in blazer app razor files are red with no editor support after update. #10089

Closed Asdfg75 closed 2 weeks ago

Asdfg75 commented 8 months ago

Describe the Issue

Just updated to: C# v2.22.3 C# Dev Kit v1.4.29

All components in razor files are now red. Looks like all razor support is broken.

Was working before update with the exception that I had to open every dependent razor component for them to be recognized in parent file.

I rolled back to C# v2.15.30 and red issue went away.

Problem is present on C# v2.22.3 and previous version C# Dev Kit.

Steps To Reproduce

No response

Expected Behavior

No response

Environment Information

About VSCode: Version: 1.87.2 Commit: 863d2581ecda6849923a2118d93a088b0745d9d6 Date: 2024-03-08T15:21:31.043Z Electron: 27.3.2 ElectronBuildId: 26836302 Chromium: 118.0.5993.159 Node.js: 18.17.1 V8: 11.8.172.18-electron.0 OS: Darwin x64 23.4.0

dibarbet commented 8 months ago

@davidwengier looks like a new issue in the latest Razor bits

ryzngard commented 7 months ago

@Asdfg75 can you set "razor.server.trace": "Trace" in your settings and include the Razor logs from the output window?

Asdfg75 commented 7 months ago

@ryzngard appreciate the follow up. Sorry for the delayed response.

I had removed Dev Kit and reverted to using C# with Omnisharp. Which works kind of.

When I saw the update come through to C# v2.23.15, updated and reinstalled C# Dev Kit v1.4.29.

Not seeing red at the moment, but many project level components get the yellow warning underline and message on hover of "Found markup element with unexpected name". If I open the file to the component in question the warning goes away, but I have to resolve in this way for many components.

One page in particular has 4 child components whose files are in same folder as page. 1 of the 4 shows as a warning. Opening the file resolves it.

I don't think I am permitted to share the logs for this project. I will need to recreate in separate project. In the meantime does this shed any light for you?

Asdfg75 commented 6 months ago

It seems like the solution needs to be pretty large for the issue to occur. I have not been able to recreated in smaller projects.

ryzngard commented 6 months ago

We do have a few issues like https://github.com/dotnet/razor/issues/9881 that may be related. This has been tracking on Mac specifically, but it's not impossible there's a similar issue on Linux.

MudBlazor as a project is a good litmus test.

ryzngard commented 2 weeks ago

This should be fixed in v2.50.25