A Blazor WebAssembly app does not arrive as a single executable file. It arrives as a set of published files that a browser downloads, and the application code usually sits in one or more DLL files inside that set. That layout changes how you should approach de4dot Blazor WebAssembly assemblies, because the useful work is finding the right file, working on a copy, and reading the result carefully instead of trying to run the app again.
This guide walks through that workflow from start to finish. You will learn where Blazor WebAssembly DLLs live in a published app, how to check whether protection is present, how to clean a copy with de4dot, and how to judge whether the cleaned code is clear enough to trust. It also covers the limits that matter most for this kind of app, including trimming, ahead of time compilation, and code that was never in the DLL in the first place.
Work only with apps you are allowed to analyze, such as your own project, a sample built for learning, or a file covered by clear written permission. Deobfuscation is a reading and review activity, not a shortcut for reusing someone else’s work, and keeping that boundary clear protects both you and the people who wrote the code.
What Makes Blazor WebAssembly Assemblies Different
In a Blazor WebAssembly app, the browser downloads the .NET runtime as WebAssembly together with the app assemblies, and the app then runs inside the browser. The published output therefore contains framework files, the app DLL, and supporting files such as configuration and JavaScript loaders. The app DLL is a normal .NET assembly in most interpreted builds, which is why de4dot can sometimes help, but it is surrounded by files that should not be cleaned.
Trimming adds another difference. A published Blazor app may have unused code removed to keep downloads small, so a cleaned assembly can look smaller or simpler than the original project. That does not always mean de4dot removed something important. It may mean the published build never included that code. Keep the build output, the file names, and your notes together so you can tell those cases apart.
A further difference is the boundary between client and server. A standalone Blazor WebAssembly app runs in the browser, while a hosted app also has a server project that handles data and authentication. Cleaning the client DLL will not explain server behavior, and cleaning the server DLL will not explain what the browser code does. Decide which side you need before you clean anything.
Start With the Published Files
Look for the published folder for the app, often under a wwwroot folder with a _framework subfolder. Inside _framework you will usually find DLL files, a boot configuration file, and the WebAssembly runtime files. The app assembly often carries the project name, while framework assemblies carry familiar library names. If you only have a website address, do not download files from a live site unless you have permission to analyze that app. Use a local publish from your own build or a sample you are allowed to inspect.
- Copy the whole published folder structure in your notes, so you know which DLL came from which location.
- Note file sizes and dates before you clean anything, because a changed file is harder to explain later.
- Open the boot configuration file in a text editor to confirm the assembly names the app loads.
- Keep the original files separate from any file you plan to clean or open in a decompiler.
Step 1: Make a Separate Working Copy
Copy the published output into a new folder that you use only for analysis. Do not clean files inside the original publish folder, a shared drive, or a folder that a build tool may overwrite. A separate copy gives you a safe place to test commands, and it makes it easy to start again if a command produces a confusing result.
Give the working folder a clear name and keep a short note with the source of the files, the date you copied them, and the reason for the review. That note becomes useful later, when a cleaned file looks different from what you expected and you need to check whether you were looking at the right build.
Step 2: Identify the App Assembly
Start with the DLL that matches the app name and contains the components, pages, and startup logic. Framework DLLs are usually large in number and familiar in name, and cleaning all of them at once wastes time and creates noise. Open the boot configuration file in a text editor to confirm which assemblies the app loads, and use that list to narrow your focus.
If the app has more than one project DLL, note how they relate to each other before you clean them. A shared library may hold models or services that several pages use, so cleaning that library first can make the main assembly easier to read. Work through dependencies in a sensible order, one file at a time, and record what each file contained.
Step 3: Detect Protection Before You Clean Anything
Run de4dot in detection mode on a copy of the app assembly before you try to clean it. Detection tells you whether de4dot recognizes a protector and gives you a starting point for the next command. If de4dot reports no known protector, the file may be unprotected, trimmed, or protected in a way de4dot does not recognize, and cleaning it may change very little.
de4dot -d MyApp.dll
Read the output carefully and save it with your notes. A clear detection result helps you explain your work later, while an unclear result is a warning to slow down, check the file in a decompiler first, and avoid assuming that a second run with different options will fix the problem.
Step 4: Clean One Copy With de4dot
When detection gives you a reason to proceed, run de4dot on the copy in your working folder. Keep the command simple at first and let de4dot write its own output file instead of trying to overwrite the original. Check for warnings in the command output, because a warning often explains why a method, a string, or a resource did not come back cleanly.
de4dot MyApp.dll
If names are still hard to follow, try a second run on a fresh copy with renaming turned off. That option can preserve the names that remain in the file, which sometimes makes the structure easier to follow even when the names themselves are not meaningful. Compare the two outputs side by side rather than overwriting the first result, so you can see which version is easier to read.
de4dot --dont-rename MyApp.dll
Do not clean the same file repeatedly in the hope that it will improve. Repeated cleaning can hide the difference between a protection problem and a build problem, and it makes your notes harder to trust. If one careful run does not help, inspect the result, check the dependencies, and consider whether the app uses a build mode that de4dot cannot handle well.
Step 5: Inspect Components, Routing, and Data Flow
Open the cleaned assembly in a decompiler and start with the parts that explain what the app does. Look for components and pages first, then follow routing, navigation, and the services that pages call. A Blazor app often expresses behavior through component lifecycles, event handlers, and injected services, so tracing those connections usually teaches you more than reading methods in isolation. If you are new to this step, the guide that explains how to open a de4dot cleaned assembly in ILSpy can help you move from a cleaned file to readable code without changing the file again.
Next, follow data flow from the user interface to any calls that leave the browser. Note which calls go to an API, which values come from configuration, and where user input is checked. Blazor WebAssembly code runs on the client, so treat any check that only happens in the browser as something a user could see or change, and look for the server side control that should back it up. That server side question is easier to judge if you understand the hosted pattern, and the guide to analyzing ASP.NET Core applications safely with de4dot explains how server and client files fit together in a published app.
Record what you found in plain language, including the components you checked, the routes you traced, and the parts that stayed unclear. A short, honest record is more useful than a long summary that claims certainty about code you could not fully recover.
What to Do When Results Look Incomplete
Incomplete results are common with Blazor WebAssembly apps, and they do not always mean you did something wrong. Trimming may have removed code, ahead of time compilation may have changed how code is stored, and some protectors may leave methods that de4dot cannot fully restore. The right response is to name the gap, not to fill it with a guess.
- If strings remain hidden, check whether string handling was part of the protection or whether the strings were removed by trimming.
- If names remain short or unclear, note that renaming may be permanent and focus on structure, calls, and data flow instead.
- If a method body looks empty or broken, compare it with the original copy before you run another command.
- If a file will not open, check its dependencies and confirm that you copied the full set of files the app needs.
When a result stays unclear, check the original copy again in a decompiler before you run another command. Compare the original and cleaned files method by method for a small sample, and use that comparison to decide whether cleaning helped at all. If it did not, stop and document the limitation instead of trying a long series of options that may damage the evidence in your working copy.
Keep the Review Safe and Lawful
Use an isolated system for files you do not fully trust, such as a virtual machine that you can reset, and keep the working folder away from real credentials, tokens, and production data. Do not run a cleaned Blazor app in a browser with live services, and do not replace a published app with a cleaned file. The goal is to understand the code, not to create a working copy of someone else’s app.
Replace any secrets you find in your notes with placeholders, and do not share cleaned files, configuration values, or API keys with people who do not need them. If the review is for a security report, keep the original file hash, the commands you ran, and the limits you found, so another reviewer can follow the same steps and reach the same conclusions.
A Practical Checklist Before You Finish
- You worked only on a copy, and the original published files are still intact.
- You recorded the app assembly, its dependencies, and the detection result from de4dot.
- You checked components, routing, and data flow, not just the first method that looked clear.
- You noted what trimming, compilation, or protection may have left unclear.
- You removed secrets from your notes and kept cleaned files out of shared or production folders.
Handled this way, a Blazor WebAssembly review stays focused. You start with the published files, clean a copy only when detection supports it, read components and data flow in a decompiler, and record both the findings and the limits. That careful order is what turns de4dot from a single command into a review you can explain and defend.
Frequently Asked Questions
Can de4dot clean every Blazor WebAssembly DLL?
No. De4dot helps most when the DLL is a standard .NET assembly protected by a method it recognizes. Trimmed builds, ahead of time compiled code, and protectors that de4dot does not recognize may leave code that stays unclear, so detection and a careful inspection should come before any claim about the result.
Where do I find the DLLs for a Blazor WebAssembly app?
Look in the published output, usually under a wwwroot folder in a _framework subfolder, where the app DLL sits alongside framework assemblies and the boot configuration file. Use a local publish from a build you are allowed to inspect, and confirm the assembly names in the boot configuration file before you clean anything.
Why does a cleaned Blazor assembly still show short or unclear names?
Renaming can be permanent, and de4dot cannot always recover the original names. Short names do not always mean the cleaning failed. Focus on the structure of components, the calls between methods, and the flow of data, and record the naming limit in your notes so readers do not mistake a short name for a meaningful one.
Should I run a cleaned Blazor WebAssembly app in a browser to test it?
For most reviews, no. Reading the cleaned code in a decompiler is safer and usually gives you the answer you need. Running a cleaned app can expose live services, real data, or untrusted code, so only do it in isolation with test data and no real credentials, and only when running the app is truly necessary for the review.
Does de4dot work with Blazor WebAssembly apps compiled ahead of time?
Expect weaker results. Ahead of time compilation changes how code is stored and can remove the clear .NET assembly structure that de4dot relies on. Try detection on a copy first, inspect the result in a decompiler, and document the limit honestly if the cleaned output does not give you readable code.


