-
Notifications
You must be signed in to change notification settings - Fork 128
Linker regression in 7.0 (wasm) #3110
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
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
/cc @lewing |
Tagging subscribers to this area: @agocke, @sbomer, @vitek-karas Issue DetailsOn a Blazor webassembly app with authentication, the linker in 7.0 seems to be incorrectly trimming the getters of an object that we json serialize. This is the linked output in 7.0 This is the linked output in 6.0 This type is used is passed as an argument to JS interop calls, which are annotated as, so the getters should be preserved (as in 6.0)
|
@javiercn Thanks for the bug report. Do you have an example of the call site as well? |
@sbomer Could you take a look? |
@javiercn I've been trying to repro this locally, but I can't seem to get the results you describe. Is there something else I need to pass to |
@javiercn that callsite looks like it would preserve properties of |
Closing as it looks like this might not be a bug. If we get more info then we can re-open. |
Uh oh!
There was an error while loading. Please reload this page.
On a Blazor webassembly app with authentication, the linker in 7.0 seems to be incorrectly trimming the getters of an object that we json serialize. This is the linked output in 7.0

This is the linked output in 6.0

This type is used is passed as an argument to JS interop calls, which are annotated as, so the getters should be preserved (as in 6.0)
https://github.com/dotnet/aspnetcore/blob/main/src/JSInterop/Microsoft.JSInterop/src/IJSRuntime.cs#L25 https://github.com/dotnet/aspnetcore/blob/main/src/Shared/LinkerFlags.cs#L13
If you want to reproduce it, you can use dotnet 7 and call
dotnet new blazorwasm -au Individual -ho -o BlazorWasmAuth
and run dotnet publish on theBlazorWasmAuth/Server
project.The text was updated successfully, but these errors were encountered: