Menu

How renaming breaks Blazor component parameters
📰

How renaming breaks Blazor component parameters

DEV Community: blazor·Zero Heartbeat·17 days ago
#quD9eDBb
#devtoblazor#devto#dev#us#component
Long article (1383 words) — no AI summary yet.
Reading 0:00
15s threshold

A Blazor Server app has nothing on the client worth protecting — the assembly runs on your server and the browser only sees HTML. A Blazor Hybrid app is the opposite. When you host a BlazorWebView inside a .NET MAUI, WPF or WinForms shell, your Razor components compile into an ordinary managed assembly that ships to the user's machine, where a decompiler reads it like any other desktop binary. That is a good reason to obfuscate it. It is also where people get surprised, because a Blazor component does not pass its parameters the way a method passes arguments. It passes them by name, through a render tree, and the names are strings.

The real question

Rename an assembly and the honest question is always the same: which names does the runtime resolve by their string , and which did the compiler already wire as a direct token reference?…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.