dnSpy for Windows: Setup, Runtimes and a Clean First Launch

Set up dnSpy for Windows the clean way: choose a package, unblock the zip, pick a folder, configure the first launch and keep settings portable.

Windows file properties dialog with the Unblock option for the dnSpy zip archive

dnSpy for Windows is portable: there is no setup wizard, no registry entries to clean up and no service running in the background. That simplicity is a strength, but it also means a few decisions are left to you. Which package fits your machine? Where should the folder live? Why does Windows sometimes refuse to load the DLLs? This guide covers the full setup on Windows 10 and 11, from the downloaded zip to a configured first session.

Before you start: check your Windows edition

Open Settings › System › About and look at System type. It tells you whether Windows is 64-bit or 32-bit. Almost every PC sold in the last decade runs 64-bit Windows, and Windows 11 exists only in a 64-bit version. On a 64-bit system you can use either the 64-bit or the 32-bit dnSpy build; on a 32-bit system only the 32-bit build works.

Also note whether you have administrator rights. You do not need them to run dnSpy, but you will need them to debug programs that run elevated or to save files into protected folders.

Choosing the right package

dnSpy 6.1.8 ships three Windows packages, and dnSpyEx releases follow the same idea. The difference is mainly about the runtime dnSpy itself runs on.

Self-contained .NET packages

dnSpy-net-win64.zip and dnSpy-net-win32.zip include their own copy of the .NET runtime. They work on a fresh Windows installation without installing anything else, which makes them ideal for virtual machines, locked-down workstations and quick tests. The trade-off is size: the bundled runtime makes the download larger.

.NET Framework package

dnSpy-netframework.zip relies on the .NET Framework already installed on the PC. dnSpy 6.1.8 requires version 4.7.2 or later. Windows 10 (since the April 2018 update) and Windows 11 already include a suitable version, typically 4.8 or 4.8.1. This package is smaller and contains both dnSpy.exe and dnSpy-x86.exe, so one folder covers 64-bit and 32-bit debugging.

Important: the runtime dnSpy runs on does not limit what it can open. Any of the packages can decompile assemblies built for .NET Framework, .NET Core, .NET 5 and later, Mono and Unity. The runtime choice only affects how dnSpy itself starts.

Unblocking the zip

Windows marks files downloaded from the internet with a hidden “Mark of the Web”. When you extract a marked zip with the built-in Explorer feature, every extracted file inherits the mark. For a single executable this only causes a SmartScreen prompt, but for an application made of hundreds of DLLs it can lead to load failures and strange errors, especially with the .NET Framework package.

The fix takes ten seconds:

  1. Right-click the downloaded zip and choose Properties.
  2. On the General tab, look for the Security line at the bottom.
  3. If it says the file came from another computer, tick Unblock and click OK.

If you already extracted the files without unblocking, you can fix the whole folder in PowerShell:

Get-ChildItem C:\Tools\dnSpy -Recurse | Unblock-File

Where to put the dnSpy folder

Pick a location you own and that is not synchronised by a cloud service. Good choices are C:\Tools\dnSpy or a folder under your user profile. A few locations to avoid:

  • Program Files: writing there requires administrator rights, which complicates saving patched assemblies or exported projects next to the tool.
  • OneDrive or Dropbox folders: synchronisation can lock files while dnSpy is using them and creates thousands of needless uploads.
  • Very long paths: deeply nested folders can hit path length limits during project export.

Keep each version in its own folder, for example C:\Tools\dnSpy-6.1.8 and a separate folder for a newer dnSpyEx build. Mixing files from different releases is a common cause of crashes at startup.

First launch

Double-click dnSpy.exe. On first launch Windows SmartScreen may show “Windows protected your PC” because the executable is not signed with a widely known certificate. Choose More info › Run anyway only if you downloaded the package from the official repository and checked it as described in the GitHub download guide.

dnSpy opens with a default list of framework assemblies such as mscorlib and System. You can remove them with File › Close All if you prefer a clean start, or keep them for quick reference.

Pin it for quick access

Because there is no installer, there is no Start menu shortcut. Right-click dnSpy.exe and choose Pin to Start or Pin to taskbar. If you use both builds, pin dnSpy-x86.exe as well and give the shortcut a clear name.

Settings worth changing on day one

Open View › Options. The defaults are sensible, but a few changes make daily work smoother.

Theme and font

Under Environment you can switch between the light, blue and dark themes. In the text editor settings you can choose the code font and size. A monospaced font with clear distinctions between similar characters helps when reading obfuscated names.

Decompiler options

The Decompiler page controls how code is reconstructed: whether to show using directives, whether to decompile async methods and iterators back into high-level form, how to display XML documentation if found, and more. If decompiled output looks overly verbose, these settings are the first place to look.

Debugger options

Under Debugger, review the options that prevent JIT optimisation when modules load. Turning them on makes breakpoints and locals far more reliable, at the cost of slightly slower execution while debugging. The debugging guide explains why.

Where dnSpy stores its settings

dnSpy keeps its configuration in an XML file inside your roaming application data folder, under a dnSpy directory. That is why your options and the list of open assemblies survive when you replace the program folder with a newer release. To reset everything, close dnSpy and rename that folder. Older dnSpy releases also look for a settings file next to the executable, which can be useful for a fully portable copy on a USB drive; check the documentation of your build before relying on it.

Opening your first assembly

Drag any .dll or .exe from Explorer onto the dnSpy window, or use File › Open. The assembly appears in the Assembly Explorer, where you can expand namespaces, types and members. Click a method to see its decompiled code. A few habits help from the start:

  • Open the referenced assemblies too. When dnSpy can resolve references, it shows proper type names and lets you navigate into them.
  • Use the back and forward buttons, or Alt+Left and Alt+Right, to retrace your path through the code.
  • Open a type in a new tab with a middle-click so you can keep the previous context visible.

Troubleshooting a Windows setup

Nothing happens when I start dnSpy

For the .NET Framework package, check that .NET Framework 4.7.2 or later is installed. If it is, confirm that the zip was unblocked. If the problem persists, try a self-contained package, which removes the dependency on the system runtime.

“The application was unable to start correctly”

This often means files from two versions were mixed, or the extraction was interrupted. Delete the folder and extract a fresh copy.

SmartScreen blocks the program entirely

On managed corporate PCs, policies may forbid unsigned tools. Ask your IT department to approve dnSpy rather than trying to work around the policy.

High DPI display looks blurry

Open the properties of dnSpy.exe, go to Compatibility › Change high DPI settings and experiment with the scaling override. Newer dnSpyEx builds handle per-monitor scaling better than 6.1.8.

Uninstalling

Close dnSpy, delete its program folder, and optionally delete the dnSpy folder in your roaming application data to remove the settings. Remove any pinned shortcuts. Nothing else was changed on the system.

Summary

Setting up dnSpy for Windows comes down to four choices: a self-contained or .NET Framework package, an unblocked archive, a sensible folder outside protected locations, and a few options adjusted on first launch. Get those right and dnSpy behaves like any well-behaved portable tool: it starts quickly, keeps its settings between versions and leaves no trace when you remove it.