-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Blazor Components are seen a unknown #49
Comments
@DevTard , we recently released an update to the C# and C# Dev Kit extensions. From your description of the behavior, it's possible that a solution which includes the projects that have your components is not open. In your particular case, do you have a *.sln file in your open folder? Do you have more than one? |
I'm sorry to hear that. Unfortunately I was unable to reproduce this issue with C# If you are still hitting this issue can you please provide a copy of the logs for |
The problem seems to still exist, happened right now with the C# and DevKit Versions you mentioned. |
Thanks for providing logs. We're still unable to find a repro on M1 Mac with versions tested. If possible, do you have a repro project for this? |
I think I was able to create a small project to reproduce the issue but I would rather not make it public, can I email it instead? |
Yup! Just send it to [email protected] |
I have this issue. Generally I find the code analysis completely broken on the MudBlazor project for me. |
It seems to me that |
For me as well, Visual Studio & VS Code experience is broken in latest versions with RZ10012 errors everywhere.. |
@jaredpar could this be related to dotnet/razor#8718? Is it possible C# Devkit is using an old version of the razor compiler for its design time compilation? Without the code there's no way for us to tell. |
dotnet/razor#9600 may be related as well, if you're updating to .NET 8 (or have changed targeting in some other way) |
I also appreciate the explanation but I'm still not clear if we should expect to be able to develop Blazor on vscode at all. If I follow the latest docs from MS for starting a Blazor Server project in VS code it gives you step by step instructions using c# Dev Kit and you end up with broken intelligence and tooling (dotnet -- version 8.0.302) https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=vsc |
We just need to find a way to slap AI on this and then it will get prioritized :) |
Maybe it works on the new copilot pc's. I think they do AI.. ;) |
I was thinking exactly the same, because it looks like AI is the only one priority for Microsoft right now |
The dev kit has definitely made the experience of coding in VS Code a lot worse. While you can develop blazor apps, there's so much noise from non-errors that it's a waste of time. Also enabling the C# Dev Kit brings VS Code performance down to the same poor level as Visual Studio, kind of defeats the point of having it. Have to stick to JetBrains Rider, which has it's own issues (mainly around support at release time). Thankfully it's cross platform so I can use it on my mac, windows and linux machines. |
It sucks because this has been broken for a while... But, here is a work around that seems to work for me.
Here is an example: |
@afallingstone hopefully we've found a fix for this with a recent merge dotnet/vscode-csharp#7273 It's expected to go out in the next prerelease of the extension. This (and a slew of similar bugs) will be re-verified if they are reproducing still |
This should be available now with |
Even after updating to C# In my case I have a solution containing two projects: When I launch Visual Studio Code, I open the entire A workaround is to open both projects ( Moreover, the existence of the Deleting Details The project I am working on is open-source and pinned on my GitHub profile. Feel free to use it to investigate/reproduce the issue. |
I have now tested it on my Windows PC and everything is exactly the same - so the problem is not related to just macOS. |
Thanks @marcel2215 , reopening |
Bumping up, got still same issues as @marcel2215 |
Hi, for me the 'solution (if we can name that..) is to just add using to namespace. Just add usings on the top of the file. It looks like the _Imports.razor is not working as should be for IDE extension. (For build it's ok) Attached screenshot before and after using. What's more interesting after additional using i can remove it after build and IDE looks fixed for all other usings... really weird |
This sounds like what should be fixed in pre-release. I'm investigating the repro with |
@marcel2215 one thing I should mention to help alleviate some of the pain: you can disable solution creation by setting "dotnet.automaticallyCreateSolutionInWorkspace": false |
Alright, I've got a repro of I filed dotnet/razor#10654 to better track the This issue as originally filed is fixed. I'll see if I can root cause the two new issues, but this issue is "resolved" in the sense that "Component discovery is not completely broken on MacOS anymore". Thank you for the detailed information @marcel2215 and @dawchelstowski |
Describe the Issue
When using the extension to program a Blazor project any custom components are not identified and are underlined as a warning
"Found markup element with unexpected name 'xxxxx'. If this is intended to be a component, add a @using directive for its namespace.Razor(RZ10012)"
This is for components that are referenced via usings and was not an issue prior to installing this extension.
Steps To Reproduce
No response
Expected Behavior
No response
Environment Information
The text was updated successfully, but these errors were encountered: