-
Notifications
You must be signed in to change notification settings - Fork 190
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
blazor after visual studio update throws some strange warnings #10896
Comments
@dibarbet @MariaSolOs I thought we stamped out all of these in 17.10? Did something change/regress with misc TS files ? |
Nothing has changed on the TS side since then. @dibarbet have there been any suspicious modifications to the TS Roslyn client? |
i downgraded to visual studio 17.10.5 and NO WARNINGS so issue is only in 17.11.3. |
I'm seeing the same behavior / problem Take note, this as nothing to do with MudBlazor as I am not using it in the affected project (we are using Radzen and the error I get are on some internal component we made) |
i see so it is global issue with OnClick events in components that want to use OnClick and handle itself the event |
The general cause is attributes that look like JavaScript events, so the JavaScript LSP server analyzes the code and reports errors (which is correct because the C# is not valid JavaScript). The Razor editor then filters out the errors, because it knows that the code is C# not JavaScript, which is why the error list doesn't have any entries from the razor file itself. The issue here is that something else is also surfacing the errors directly from the virtual JavaScript documents, which is why the file names in the error list look like that. |
Is there an existing issue for this?
Describe the bug
after update visual studio to 17.11.3
in some componentsthat i open VS throw some warning as
as on screen
the issue is with this:
OnClick="@(async () => await Validate())">
orOnClick="Validate"
i causing this isssue
@onclick="@(async () => await Validate())">
or@onclick="Validate"
this one do not throws the warning
but BOTH should be correct and not throw any warning as OnClick is valid APi call on mudblazor button
https://mudblazor.com/api/button#properties
please fix that in visual studio - the error should be different / maybe pointing into correct line at least... ?
why this was valid in older versions ? why it shows the exception now ?
before update there was no such things...?
Expected Behavior
-it should not throw this warning
-doubleclick sould take to error line?
Steps To Reproduce
Minimal Reproducible Example
Exceptions (if any)
(JS) expression expected.
.NET Version
8.0.400
The text was updated successfully, but these errors were encountered: