A debugger and .NET assembly editor. It can be used to edit and debug assemblies even if no source code available is available.
Questions tagged [dnspy]
33 questions
8
votes
3 answers
dnSpy showing strange disassembly code for async methods
I am trying to disassemble my .NET core 3.1 binary using the latest build of dnSpy but am getting output like this:
The original method:
public async Task
- > CalculatePackagesDeltaAsync(List

Colton Scottie
- 807
- 1
- 8
- 22
3
votes
1 answer
Why are all the methods in Assembly-CSharp.dll empty?
I have recently decompiled the GameAssembly.dll from Among Us using Il2CppDumper-v6.7.6
My problem is that while i have the file Assembly-CSharp.dll open with dnSpy, all of the methods/functions are empty, as shown below,
Does anyone know how i…

ellis
- 51
- 1
2
votes
0 answers
dnSpy: What do included reference assemblies affect?
I'm modifying a DLL through dnSpy, and said modification required a reference assembly in order to recompile. The modification did not necessitate the reference assembly, it was just needed in order to recompile the changed section, with or without…

Gumpf
- 197
- 7
1
vote
0 answers
DnSpy fails to decompile self-contained single file produced C# .exe
I have created a simple project written in C# using Visual Studio 2022 (.NET Core 6.0) and have published my project to a folder in a single file, self contained form in order for the produced .exe to contain both the dll and the json files of the…

Astral Wanderer
- 21
- 3
1
vote
0 answers
How to add comments in dnSpy?
Is there a way to add comments in the decompiled window of dnSpy ?
For example, a comment before a function as it is possible to do it with '/' in Ida.
I tried to use several shortcuts but none worked.

Dehka
- 21
- 3
1
vote
1 answer
Decompiling vb.net application
[CompilerGenerated]
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
[AccessedThroughProperty("SimpleButton1")]
private SimpleButton _SimpleButton1;
internal virtual SimpleButton SimpleButton1
{
[CompilerGenerated]
…

Muthu Narayanan
- 11
- 1
1
vote
1 answer
dnSpy Console does not show any output
I need to automate .Net decompilation to C# using dnSpy. I downloaded it from https://github.com/dnSpy/dnSpy/releases/tag/v6.1.8 (x64 version on Win10 x64 computer) and unziped.
But when I try to run dnSpy.Console.exe from terminal (both Windows…

Martin Bobčík
- 108
- 7
1
vote
0 answers
Dnspy: Debug Error when trying to attach to Process - Debugging is not possible due to an incompatibility within the CLR implementation
I want to debug a running process to get some internal informations in a DotNet Tool. I've opened the Exe-File in Dnspy and have set an break point at the position I want to take a look. Then I've tried to attach to a running Process. Unfortunately…

user276116
- 11
- 1
1
vote
0 answers
Start DnSpy and immediately attach to process
I'd like to use DnSpy as a debugger with my homegrown C# IDE. I'd like to be able to start DnSpy programmatically from my IDE and automatically attach it to the process that executes the compiled user code.
A quick look at StartUpClass class seems…

anakic
- 2,746
- 1
- 30
- 32
1
vote
1 answer
Using DLLImport with dnlib
I have a C# project that I want to modify with dnlib.
Modifying it with dnspy, I can add the code in just fine.
However, I was not able to find a way to add the DLLImport in with dnlib, and all searches came up dry.
How can I pull this off? Can it…

Topaz M. Whitelock
- 31
- 3
1
vote
1 answer
How to Suppress JIT optimization in .NET Core
I can't find a way to suppress JIT optimization in a .NET Core 2.2 process. This prevents me from attaching with a debugger in production and seeing all local variables.
In .NET Framework I could add an INI file with the same name as the DLL I…

Michael_S_
- 488
- 4
- 11
- 26
1
vote
1 answer
Dnspy compilation error without editing the code
The 'ConnectionState' exists in both 'System.Data.Common, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
bool flag2 = this.sqlite_conn.State !=…

user8420153
- 11
- 1
- 3
1
vote
3 answers
Duplicated yield break in Enumerable
I am learning linq throught decompiling the System.Core.dll (4.7.3429.0) by dnSpy and see duplicated 'yield break;' in several cases, like this one
private static IEnumerable CastIterator(IEnumerable source)
{
foreach…

Kamerton
- 315
- 3
- 9
0
votes
0 answers
CS8010: DLL recompile with dnSpy - agnostic assembly cannot have a processor specific module System.EnterpriseServices.Wrapper.dll
I have a dll to edit Assembly Attributes
but when compile it notify error as my title.
How can I fix this?
I search on internet and find solution that open dll with dnspy32 or 64 and repeat edit, compile. It didn't work for me

n3uc0m34
- 1
0
votes
0 answers
How i write MessageBox using dnlib
When i write code to show messagebox in Entry point it will not run but if i replace the messagebox to file write it will run without problem.
And if i make compile in dnspy and save the assembly again it will run!.
Code ** i used dnlib ** :
…

TNAlotaibi
- 1
- 1