Giter Club home page Giter Club logo

dnspy's People

Contributors

dependabot[bot] avatar elektrokill avatar fifty-six avatar fireundubh avatar geokar2006 avatar holly-hacker avatar honeyakshat999 avatar hymccord avatar inlineasm avatar kapsir avatar kidkaneda avatar lfriede avatar mitchcapper avatar mobile46 avatar patricksadowski avatar pawlos avatar qianmoxi avatar rigdern avatar riqq avatar s809 avatar saplonily avatar slowlogicboy avatar smourier avatar sychicboy avatar symbai avatar ulysseswu avatar umair-me avatar wenveo avatar wtfsck avatar wulian233 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dnspy's Issues

System.OverflowException Error

  • What version did you use?
    6.1.9
  • Write down all steps needed to reproduce this issue. Also attach any needed files.
    This just happens at random times for me - nothing that I do makes it happen, just shows up occasionally.
    image

Attached is the file that the issue has been occurring on, although I don't know if that has anything to do with the issue as I haven't really decompiled other files.
Assembly-CSharp.zip

Can't start debugger in some case due to time out reason.

When I enable trace mode for some ASP.NET binary, it started to print out enormous number of traces into console
which slows down stratup greatly!

After some seconds dnSpyEx shows this error box and quits


Could not start the debugger. Make sure you have access to the file 'C:\temp\my_sw.exe'

Error: Waiting for CoreCLR timed out. Debug 32-bit .NET apps with 32-bit dnSpy (dnSpy-x86.exe), and 64-bit .NET apps with 64-bit dnSpy (dnSpy.exe).

Note; my .exe is 64 bit and I'm using dnSpyEx 64 bit. So the only reason it very small timeout...

Idea is either to more this timeout or make it configurable in Options Window for Debugger

Work not good with dynamic objects

Hello I'm a very new C# learner, recently I wrote some demo code with dynamic objects, which I just learn.

But code in dnspy becomes very hard to read.
"dynamic" becomes "object" and many lines about
dynamic object broken like "myclass_<>p50_<>o7"

I tried latest release but same
I tried latest ILSpy, the code is correct

I tried compare code between ilspy and dnspy , want to find something about it. But .sln is too big and too hard for me to read

So that's all I know, pls tell me if my issue is(maybe) a part of other one or it's already planned to fix

Feature Idea: Decompiler code style options

Since dnSpy relies on NRefactory to output the CSharp code, it is possible to customize the code style of the output to some degree. A settings panel under the Decompiler -> C#/VB (ILSpy) with all the available and working options would be ideal. Moreover, NRefactory offers some pre-configured styles for which we could offer a dropdown list.

GitHub Actions artifacts huge in size

It seems that after #13 was merged the artifacts have significantly grown in size. The .net core artifacts have gone from around 80MB to around 200MB and the .net framework artifact has gone from 20MB to 60MB. This is probably caused by the fact that GitHub actions doesn’t compress the artifacts or uses a different algorithm. This wasn’t a problem before as the compression was handled by powershell.

Goal: Find a way to shrink the artifacts in size so people with slower connections and or data caps have a easier time downloading dnSpySx.

Improve AntiAntiDebug component by adding more bypasses.

.NET obfuscators and protectors like to employ "Anti Debug" measures to prevent debugging. dnSpy is currently able to bypass the following methods of checking for a debugger:

  • IsAttached and IsLogging properties/methods from the System.Diagnostics.Debugger class.
  • CheckRemoteDebuggerPresent native API.
  • IsDebuggerPresent native API.

Other known ways that can detect the dnSpy debugger:

  • Checking for presence of the dnSpy hooks on CheckRemoteDebuggerPresent and IsDebuggerPresent.
  • CloseHandle native API - passing an invalid handle that is not zero will cause the API to throw an exception only if the process is running under a debugger. Implemented in 22ec81d.
  • NtQueryInformationProcess native API - Used to retrieve the parent process and is often compared to an internal table of known debugger tools.
  • Checking process list for process names that contain dnSpy - Very rarely used in software that is not UnpackMes.
  • Checking for the existence of %APPDATA%\dnSpy\dnSpy.xml file - Very rarely used in software that is not UnpackMes.

Potential solutions:

  1. Allow usage of https://github.com/x64dbg/ScyllaHide together with dnSpy to greatly improve the AntiAntiDebug component.
  2. If 1 fails or is not viable, we can manually implement bypasses for the aforementioned methods.

Update ILSpy decompiler engine to a later version

Currently, dnSpyEx uses a heavily modified and patched version of ICSharpCode.Decompiler version 2.4 and NRefactory to decompile C# code. However, with the continuous updates of the C# language and the Roslyn compiler the decompilation output is slowly becoming more and more unreadable and inaccurate. The rather dated 2.4 version of ILSpy has a hard time dealing with newer code for features such as async, yield return, nullable, Span<T>, etc. Moreover, the version 2.4 decompiler engine and codebase are hard to work with, so pushing updates to it is rather hard and painful.

Originally the ILSpy 2.4 engine was based on Mono.Cecil but due to cecil's poor ability to load obfuscated assemblies, it was ported to dnlib by Ki (yck1509). Moreover, the way it prints the decompiled code was heavily modified to match dnSpy together with several other changes.

Possible approaches of taking on this problem:

  • Port ILSpy 7.1 decompiler engine from SRM to dnlib and apply the necessary changes needed to make it work under dnSpy.
    Since version 4.0 the ILSpy team switched the decompiler and type system implementation to use System.Reflection.Metadata, a very low-level metadata reader. Porting from SRM to dnlib will definitely be very challenging and time-consuming. The hrdest part being reimplementing the type system to use dnlib.
  • Port ILSpy 3.2 decompiler engine to dnlib and backport changes from ILSpy 7.1 creating a "hybrid".
    ILSpy 3.2 was the last version that still used a higher-level metadata reading library(cecil) to power the decompiler. This makes porting it to dnlib significantly easier. Moreover, the engine has not undergone any huge architectural changes since version 3.2 making it quite easy to backport most of the decompiler changes that don't rely on the type system implementation or SRM. The 3.x engine is much better and more flexible than the 2.4 engine but has one thing which makes porting the hardest, the type system.
  • Backup plan in case the first two flop...
    We can continue to rely on the dated 2.4 decompiler and attempt to implement support for new features into it even if it will require a lot of pain...

It is worth noting that approaches 1 and 2 also will require a considerable amount of changes to the decompiler and dnSpy to properly function with the dnSpy frontend, debugger, and other dnSpy features on top of the port to dnlib.

Suggestions, discussions, and novel approach ideas are welcome in the comments!

Include Unity Debug Files

Yah, the 0xd4d even deleted the old releases of the dnspy, if possible include that unity debug files as well in the next releases :)

Wrong rva conversion

  • What version did you use?
    6.1.9

  • Write down all steps needed to reproduce this issue. Also attach any needed files.

  1. Open the assembly
  2. Click Assembly -> Module -> PE
  3. Throw an exception
    image

This assembly is obfuscated by 'Virbox'. You can see raw address of pe section '.text' is zero. The data will be restored at runtime.
I used to fix that by changing dnspy rva conversion. Maybe it is helpful.
wwh1004@503a665#diff-ff1abfce4050a43e302006c993e2c3fbf6bb9db7cbcdbf1f7d12cb65aacd7c25L47

Single assembly:
1.zip

Fails to compile on Linux due to WPF dependencies

Version

commit 68c0ee0

Reproduction Steps

  1. Use Ubuntu 20.04 LTS
  2. Install .NET 5.0 SDK via Microsoft's apt repo
  3. clone repository and cd to it in console
  4. run dotnet build

Results

nexis@rob-laptop:~/dnSpy-dev$ dotnet build
Microsoft (R) Build Engine version 16.10.2+857e5a733 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/dnSpy/dnSpy.Contracts.DnSpy/dnSpy.Contracts.DnSpy.csproj]                                                                                                                                                                                                                                                                      
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/dnSpy/Roslyn/dnSpy.Roslyn/dnSpy.Roslyn.csproj]  
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/Extensions/dnSpy.Debugger/dnSpy.Debugger/dnSpy.Debugger.csproj]                                                                                                                                                                                                                                                                
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/dnSpy/dnSpy.Decompiler/dnSpy.Decompiler.csproj] 
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/Extensions/Examples/Example1.Extension/Example1.Extension.csproj]                                                                                                                                                                                                                                                              
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/Extensions/dnSpy.Scripting.Roslyn/dnSpy.Scripting.Roslyn.csproj]                                                                                                                                                                                                                                                               
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/Libraries/ICSharpCode.TreeView/ICSharpCode.TreeView.csproj]                                                                                                                                                                                                                                                                    
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/dnSpy/dnSpy/dnSpy.csproj]                       
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/dnSpy/dnSpy.Images/dnSpy.Images.csproj]         
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/Extensions/dnSpy.AsmEditor/dnSpy.AsmEditor.csproj]                                                                                                                                                                                                                                                                             
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/Extensions/dnSpy.Debugger/dnSpy.Debugger.DotNet.CorDebug/dnSpy.Debugger.DotNet.CorDebug.csproj]
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/Extensions/dnSpy.Debugger/dnSpy.Debugger.DotNet.Mono/dnSpy.Debugger.DotNet.Mono.csproj]
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/Extensions/Examples/Example2.Extension/Example2.Extension.csproj]
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/Extensions/dnSpy.BamlDecompiler/dnSpy.BamlDecompiler.csproj]
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/Extensions/ILSpy.Decompiler/dnSpy.Decompiler.ILSpy/dnSpy.Decompiler.ILSpy.csproj]
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/dnSpy/dnSpy.Console/dnSpy.Console.csproj]
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/Extensions/dnSpy.Analyzer/dnSpy.Analyzer.csproj]
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/Extensions/dnSpy.Debugger/dnSpy.Debugger.DotNet/dnSpy.Debugger.DotNet.csproj]

Build FAILED.

/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/dnSpy/dnSpy.Contracts.DnSpy/dnSpy.Contracts.DnSpy.csproj]
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/dnSpy/Roslyn/dnSpy.Roslyn/dnSpy.Roslyn.csproj]
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/Extensions/dnSpy.Debugger/dnSpy.Debugger/dnSpy.Debugger.csproj]
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/dnSpy/dnSpy.Decompiler/dnSpy.Decompiler.csproj]
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/Extensions/Examples/Example1.Extension/Example1.Extension.csproj]
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/Extensions/dnSpy.Scripting.Roslyn/dnSpy.Scripting.Roslyn.csproj]
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/Libraries/ICSharpCode.TreeView/ICSharpCode.TreeView.csproj]
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/dnSpy/dnSpy/dnSpy.csproj]
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/dnSpy/dnSpy.Images/dnSpy.Images.csproj]
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/Extensions/dnSpy.AsmEditor/dnSpy.AsmEditor.csproj]
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/Extensions/dnSpy.Debugger/dnSpy.Debugger.DotNet.CorDebug/dnSpy.Debugger.DotNet.CorDebug.csproj]
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/Extensions/dnSpy.Debugger/dnSpy.Debugger.DotNet.Mono/dnSpy.Debugger.DotNet.Mono.csproj]
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/Extensions/Examples/Example2.Extension/Example2.Extension.csproj]
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/Extensions/dnSpy.BamlDecompiler/dnSpy.BamlDecompiler.csproj]
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/Extensions/ILSpy.Decompiler/dnSpy.Decompiler.ILSpy/dnSpy.Decompiler.ILSpy.csproj]
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/dnSpy/dnSpy.Console/dnSpy.Console.csproj]
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/Extensions/dnSpy.Analyzer/dnSpy.Analyzer.csproj]
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/home/nexis/dnSpy-dev/Extensions/dnSpy.Debugger/dnSpy.Debugger.DotNet/dnSpy.Debugger.DotNet.csproj]
    0 Warning(s)
    18 Error(s)

Time Elapsed 00:00:03.41

Why this is a problem

I know this is a huge PITA to unravel and fix, but it would be nice to at least have the CLI app build on Linux.

Debug with Unity

Sorry about the other issue I made, I was just really in a rush. Anyways, I found the pre-compiled DLLs but, the game I am playing just stays on the first scene which is a screen with rolling text at the top and bottom saying Playtest then a couple seconds later IT SHOULD fade into the MAIN scene but it doesn't. It just stays looping on that scene FOREVER.

Right so:

  1. Start > Unity > OK
  2. The game starts, but stays on the scrolling text scene. Doesn't proceed.

Running the game normally works but with this it doesn't.

Implement Autos window in debugger

Currently, the "Autos" tool window displays a temporary "NYI" node to signal that it's not implemented.
Looking at VS, the Autos window should display all variables and class members before and on the current line when a breakpoint is hit.

Support for Xamarin compressed files

Some files compiled by Xamarin are compressed with LZ4 (see dotnet/android#4686) - would it be possible to add support for this? Another Github user has provided a Python file to decompress it, but it would be nice if it was built in to dnSpy.

Some issues

Before clicking Submit new issue, try the latest build

  • What version did you use?
    6.1.9
  • Write down all steps needed to reproduce this issue. Also attach any needed files.
  1. delegate creation becomes like <p0>, <p1>
    image
  2. dnSpy resolves the wrong ctor:
    image
    In this case there are 2 ctors, and one is using string which should be used.
    image

I guess this will be resolved with the update of ilspy lib?
The file: https://download.osufx.com/release/osu!.exe

Broken links in README

Just to let you know, there are links to the wiki and elsewhere in the README that lead to the now-archived dnspy/dnspy repo.

Add option to sort decompiled members

Recently I wanted to decompile 2 versions of an application to diff them, and the compiler-generated code always seems to move classes around in the file. An option to sort decompiled methods/classes in the decompiled code would prevent this.

[Feature Request] Strings Window or column

A lot of people ask about string window in dnspy ala x64dbg or olly, some had developed a plugin without good results though.
Here is an easy solution for this feature.
You can search for strings with regex pattern /./ (all). but then cant see which strings are found. The solution is just add a column to the search results in string mode. This is really useful when using regex. Maybe can add a button all strings which inserts this regex query /./.
Unfortunately I lost my source code but the mod is very simple.

Here is a screenshot of the feature.
image

ILAstBuilder stack inconsistency

  • What version did you use?
    Current master branch built from source (https://github.com/dnSpyEx/dnSpy/tree/3302df9216b0e4a05d444b13a65a33adaa610fee)

  • Write down all steps needed to reproduce this issue. Also attach any needed files.
    Attached is a zip archive with the password 'infected'. The contained file is malware, do not execute it, the .exe extension has been removed for safety. Open this file in dnSpy and navigate through the file, multiple functions will fail to decompile with a 'Inconsistent stack size at' in the file ICSharpCode.Decompiler.ILAst.ILAstBuilder.cs

This exposes a larger issue, which is that dnSpy still uses the ILAstBuilder from an old version of ILSpy (v2.4 i think?). This appears to have been replaced with a 'new decompiler' in commit icsharpcode/ILSpy@0cd8e21 which deletes the file ILAstBuilder.cs. The last commit to contain this file is: https://github.com/icsharpcode/ILSpy/blob/19800c3b162dd003f88c3171861912f9e77f1f41/ICSharpCode.Decompiler/ILAst/ILAstBuilder.cs

Details:

// Token: 0x0600003A RID: 58 RVA: 0x000027C0 File Offset: 0x000009C0
public static IntPtr \u202A\u202D\u206A\u200B\u206A\u202D\u202E\u202C\u206C\u202C\u206E\u200D\u206C\u202B\u206F\u206A\u206A\u202E\u206F\u206C\u206A\u200E\u206C\u202A\u202B\u200E\u206B\u200F\u200B\u202B\u202C\u206F\u202E\u202C\u200E\u206A\u200D\u200B\u206F\u200D\u202E(string)
{
/*
An exception occurred when decompiling this method (0600003A)

ICSharpCode.Decompiler.DecompilerException: Error decompiling System.IntPtr ‌‌‍‮‬‫‍‪‭‏‭‍‭‪‏‎‍‬‌‌‭‍‌​‬‮::‪‭​‭‮‬‬‍‫‮‎‪‫‎‏​‫‬‮‬‎‍​‍‮(System.String)
 ---> System.Exception: Inconsistent stack size at IL_D8
   at ICSharpCode.Decompiler.ILAst.ILAstBuilder.StackAnalysis(MethodDef methodDef) in C:\Users\steve\source\repos\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstBuilder.cs:line 443
   at ICSharpCode.Decompiler.ILAst.ILAstBuilder.Build(MethodDef methodDef, Boolean optimize, DecompilerContext context) in C:\Users\steve\source\repos\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstBuilder.cs:line 269
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in C:\Users\steve\source\repos\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 112
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in C:\Users\steve\source\repos\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
   --- End of inner exception stack trace ---
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in C:\Users\steve\source\repos\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
   at ICSharpCode.Decompiler.Ast.AstBuilder.<>c__DisplayClass90_0.<AddMethodBody>b__0() in C:\Users\steve\source\repos\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1519
*/;
}

IL code:

Spoiler: IL code
  // Token: 0x0600003A RID: 58 RVA: 0x000027C0 File Offset: 0x000009C0
.method public hidebysig static 
	native int '‪‭​‭‮‬‬‍‫‮‎‪‫‎‏​‫‬‮‬‎‍​‍‮' (
		string ''
	) cil managed 
{
	// Header Size: 12 bytes
	// Code Size: 347 (0x15B) bytes
	// LocalVarSig Token: 0x11000009 RID: 9
	.maxstack 4
	.locals init (
		[0] class [mscorlib]System.Collections.IEnumerator,
		[1] class [System]System.Diagnostics.ProcessModule,
		[2] native int,
		[3] class [mscorlib]System.IDisposable,
		[4] uint32
	)

	/* 0x000009CC 2841000006   */ IL_0000: call      class [System]System.Diagnostics.Process '‌‌‍‮‬‫‍‪‭‏‭‍‭‪‏‎‍‬‌‌‭‍‌​‬‮'::'‮‌‍‍‪‬‭​‍‏‭‌‫‌‪‏‍‫‪‫‮$PST06000041'()
	/* 0x000009D1 2842000006   */ IL_0005: call      class [System]System.Diagnostics.ProcessModuleCollection '‌‌‍‮‬‫‍‪‭‏‭‍‭‪‏‎‍‬‌‌‭‍‌​‬‮'::'‫‮‌‏‍‬​‎‌‎‪‬​‎‬​‮‪‏‏‎‭‌‪​‫‮$PST06000042'(class [System]System.Diagnostics.Process)
	/* 0x000009D6 2843000006   */ IL_000A: call      class [mscorlib]System.Collections.IEnumerator '‌‌‍‮‬‫‍‪‭‏‭‍‭‪‏‎‍‬‌‌‭‍‌​‬‮'::'‬‍‬​‮​‍‫​‎‫‏‬‏​‎‭‏​‮‎‫‬‮$PST06000043'(class [mscorlib]System.Collections.ReadOnlyCollectionBase)
	/* 0x000009DB 0A           */ IL_000F: stloc.0
	.try
	{
		/* 0x000009DC 38AB000000   */ IL_0010: br        IL_00C0

		/* 0x000009E1 2008D4990C   */ IL_0015: ldc.i4    211407880
		// loop start (head: IL_001A)
			/* 0x000009E6 2001B57E13   */ IL_001A: ldc.i4    327070977
			/* 0x000009EB 61           */ IL_001F: xor
			/* 0x000009EC 25           */ IL_0020: dup
			/* 0x000009ED 1304         */ IL_0021: stloc.s   V_4
			/* 0x000009EF 1C           */ IL_0023: ldc.i4.6
			/* 0x000009F0 5E           */ IL_0024: rem.un
			/* 0x000009F1 4506000000D3FFFFFF490000007E0000009F0000001E0000000A000000 */ IL_0025: switch    (IL_0015, IL_008B, IL_00C0, IL_00E1, IL_0060, IL_004C)

			/* 0x00000A0E 17           */ IL_0042: ldc.i4.1
			/* 0x00000A0F 2CD0         */ IL_0043: brfalse.s IL_0015

			/* 0x00000A11 3897000000   */ IL_0045: br        IL_00E1

			/* 0x00000A16 11FF         */ IL_004A: ldloc.s   <null>

			/* 0x00000A18 06           */ IL_004C: ldloc.0
			/* 0x00000A19 2844000006   */ IL_004D: call      object '‌‌‍‮‬‫‍‪‭‏‭‍‭‪‏‎‍‬‌‌‭‍‌​‬‮'::'‎‮‭‬‏‌‫‏‭‭‎‏‫‍‪‌‬‫‏‏‎‏‭​‫‎‏‪‬‮$PST06000044'(class [mscorlib]System.Collections.IEnumerator)
			/* 0x00000A1E 7416000001   */ IL_0052: castclass [System]System.Diagnostics.ProcessModule
			/* 0x00000A23 0B           */ IL_0057: stloc.1
			/* 0x00000A24 20408CE034   */ IL_0058: ldc.i4    887131200
			/* 0x00000A29 2BBB         */ IL_005D: br.s      IL_001A

			/* 0x00000A2B 25           */ IL_005F: dup
			// loop start (head: IL_0060)
				/* 0x00000A2C 07           */ IL_0060: ldloc.1
				/* 0x00000A2D 2848000006   */ IL_0061: call      native int '‌‌‍‮‬‫‍‪‭‏‭‍‭‪‏‎‍‬‌‌‭‍‌​‬‮'::'‬‎‫‭‏​‌‫‮‪‫‍‪‌‭‌‫‪‪‍‪‪‮$PST06000048'(class [System]System.Diagnostics.ProcessModule)
				/* 0x00000A32 0C           */ IL_0066: stloc.2
				/* 0x00000A33 DDED000000   */ IL_0067: leave     IL_0159

				/* 0x00000A38 1104         */ IL_006C: ldloc.s   V_4
				/* 0x00000A3A 20BA0D0AF3   */ IL_006E: ldc.i4    -217444934
				/* 0x00000A3F 5A           */ IL_0073: mul
				/* 0x00000A40 208D1EE375   */ IL_0074: ldc.i4    1977818765
				/* 0x00000A45 61           */ IL_0079: xor
				/* 0x00000A46 D005000006   */ IL_007A: ldtoken   method string '‎‭‌‪‪‭‏​‍‫‏‪‌‫‎‭‭‭‏‌‬‎‍‍‍‌‍‭‮'::'‏‮‍​‭‭‌‍‎‎​​‪​​‎‭‎‍​‫‌‎‌‍​‫‮'()
				/* 0x00000A4B 8C28000001   */ IL_007F: box       [mscorlib]System.RuntimeMethodHandle
				/* 0x00000A50 2CDA         */ IL_0084: brfalse.s IL_0060
			// end loop
			/* 0x00000A52 16           */ IL_0086: ldc.i4.0
			/* 0x00000A53 26           */ IL_0087: pop
			/* 0x00000A54 2B90         */ IL_0088: br.s      IL_001A

			/* 0x00000A56 26           */ IL_008A: pop

			/* 0x00000A57 07           */ IL_008B: ldloc.1
			/* 0x00000A58 2845000006   */ IL_008C: call      string '‌‌‍‮‬‫‍‪‭‏‭‍‭‪‏‎‍‬‌‌‭‍‌​‬‮'::'‌‫‬‮​‫‏‌‌‪‫‪‌‎‫‫‌‌‪‍‬‬‮$PST06000045'(class [System]System.Diagnostics.ProcessModule)
			/* 0x00000A5D 2846000006   */ IL_0091: call      string '‌‌‍‮‬‫‍‪‭‏‭‍‭‪‏‎‍‬‌‌‭‍‌​‬‮'::'‮‍‭‌‫‫‪‭‭‫‮‬‪‬‍‮‬‮‮‮‬‮$PST06000046'(string)
			/* 0x00000A62 02           */ IL_0096: ldarg.0
			/* 0x00000A63 2846000006   */ IL_0097: call      string '‌‌‍‮‬‫‍‪‭‏‭‍‭‪‏‎‍‬‌‌‭‍‌​‬‮'::'‮‍‭‌‫‫‪‭‭‫‮‬‪‬‍‮‬‮‮‮‬‮$PST06000046'(string)
			/* 0x00000A68 2847000006   */ IL_009C: call      bool '‌‌‍‮‬‫‍‪‭‏‭‍‭‪‏‎‍‬‌‌‭‍‌​‬‮'::'‌‫‭‍‭​​‬‮‌‍‮‎‮‍‬‍‎‌‎‮‮‍‌‬‮$PST06000047'(string, string)
			/* 0x00000A6D 2D08         */ IL_00A1: brtrue.s  IL_00AB

			/* 0x00000A6F 208479EDBA   */ IL_00A3: ldc.i4    -1158841980
			/* 0x00000A74 25           */ IL_00A8: dup
			/* 0x00000A75 2B06         */ IL_00A9: br.s      IL_00B1

			/* 0x00000A77 20E03A4DBA   */ IL_00AB: ldc.i4    -1169343776
			/* 0x00000A7C 25           */ IL_00B0: dup

			/* 0x00000A7D 26           */ IL_00B1: pop
			/* 0x00000A7E 1104         */ IL_00B2: ldloc.s   V_4
			/* 0x00000A80 20399E4318   */ IL_00B4: ldc.i4    407084601
			/* 0x00000A85 5A           */ IL_00B9: mul
			/* 0x00000A86 61           */ IL_00BA: xor
			/* 0x00000A87 385AFFFFFF   */ IL_00BB: br        IL_001A
		// end loop
		// loop start (head: IL_00C0)
			/* 0x00000A8C 06           */ IL_00C0: ldloc.0
			/* 0x00000A8D 2849000006   */ IL_00C1: call      bool '‌‌‍‮‬‫‍‪‭‏‭‍‭‪‏‎‍‬‌‌‭‍‌​‬‮'::'‎‬​‏‌‌‪‌‏‬‍‭​​‫‌‪‌‍‪‮$PST06000049'(class [mscorlib]System.Collections.IEnumerator)
			/* 0x00000A92 2C08         */ IL_00C6: brfalse.s IL_00D0

			/* 0x00000A94 2008D4990C   */ IL_00C8: ldc.i4    211407880
			/* 0x00000A99 25           */ IL_00CD: dup
			/* 0x00000A9A 2B06         */ IL_00CE: br.s      IL_00D6

			/* 0x00000A9C 20CA75476C   */ IL_00D0: ldc.i4    1816622538
			/* 0x00000AA1 25           */ IL_00D5: dup

			/* 0x00000AA2 26           */ IL_00D6: pop
			/* 0x00000AA3 17           */ IL_00D7: ldc.i4.1
			/* 0x00000AA4 2CE6         */ IL_00D8: brfalse.s IL_00C0
		// end loop
		/* 0x00000AA6 383BFFFFFF   */ IL_00DA: br        IL_001A

		/* 0x00000AAB 0EFF         */ IL_00DF: ldarg.s   <null>

		/* 0x00000AAD DE70         */ IL_00E1: leave.s   IL_0153
	} // end .try
	finally
	{
		/* 0x00000AAF 06           */ IL_00E3: ldloc.0
		/* 0x00000AB0 7507000001   */ IL_00E4: isinst    [mscorlib]System.IDisposable
		/* 0x00000AB5 0D           */ IL_00E9: stloc.3

		/* 0x00000AB6 20E4BDDB51   */ IL_00EA: ldc.i4    1373355492
		// loop start (head: IL_00EF)
			/* 0x00000ABB 2001B57E13   */ IL_00EF: ldc.i4    327070977
			/* 0x00000AC0 61           */ IL_00F4: xor
			/* 0x00000AC1 25           */ IL_00F5: dup
			/* 0x00000AC2 1304         */ IL_00F6: stloc.s   V_4
			/* 0x00000AC4 1A           */ IL_00F8: ldc.i4.4
			/* 0x00000AC5 5E           */ IL_00F9: rem.un
			/* 0x00000AC6 4504000000290000000700000043000000DBFFFFFF */ IL_00FA: switch    (IL_0138, IL_0116, IL_0152, IL_00EA)

			/* 0x00000ADB 17           */ IL_010F: ldc.i4.1
			/* 0x00000ADC 2CD8         */ IL_0110: brfalse.s IL_00EA

			/* 0x00000ADE 2B3E         */ IL_0112: br.s      IL_0152

			/* 0x00000AE0 0EFF         */ IL_0114: ldarg.s   <null>
			// loop start (head: IL_0116)
				/* 0x00000AE2 09           */ IL_0116: ldloc.3
				/* 0x00000AE3 2C08         */ IL_0117: brfalse.s IL_0121

				/* 0x00000AE5 20C0946FCA   */ IL_0119: ldc.i4    -898657088
				/* 0x00000AEA 25           */ IL_011E: dup
				/* 0x00000AEB 2B06         */ IL_011F: br.s      IL_0127

				/* 0x00000AED 2092F723A0   */ IL_0121: ldc.i4    -1608255598
				/* 0x00000AF2 25           */ IL_0126: dup

				/* 0x00000AF3 26           */ IL_0127: pop
				/* 0x00000AF4 1104         */ IL_0128: ldloc.s   V_4
				/* 0x00000AF6 20D5444BDC   */ IL_012A: ldc.i4    -599046955
				/* 0x00000AFB 5A           */ IL_012F: mul
				/* 0x00000AFC 61           */ IL_0130: xor
				/* 0x00000AFD 16           */ IL_0131: ldc.i4.0
				/* 0x00000AFE 2DE2         */ IL_0132: brtrue.s  IL_0116
			// end loop
			/* 0x00000B00 2BB9         */ IL_0134: br.s      IL_00EF

			/* 0x00000B02 11FF         */ IL_0136: ldloc.s   <null>
			// loop start (head: IL_0138)
				/* 0x00000B04 09           */ IL_0138: ldloc.3
				/* 0x00000B05 284A000006   */ IL_0139: call      void '‌‌‍‮‬‫‍‪‭‏‭‍‭‪‏‎‍‬‌‌‭‍‌​‬‮'::'​‌‎‫‎‏​​‏‍‏‫‍​‏‫‎‮‍‮‌‭‍‬‬‮$PST0600004A'(class [mscorlib]System.IDisposable)
				/* 0x00000B0A 1104         */ IL_013E: ldloc.s   V_4
				/* 0x00000B0C 20E968E190   */ IL_0140: ldc.i4    -1864275735
				/* 0x00000B11 5A           */ IL_0145: mul
				/* 0x00000B12 2093D9B470   */ IL_0146: ldc.i4    1890900371
				/* 0x00000B17 61           */ IL_014B: xor
				/* 0x00000B18 17           */ IL_014C: ldc.i4.1
				/* 0x00000B19 2CE9         */ IL_014D: brfalse.s IL_0138
			// end loop
			/* 0x00000B1B 2B9E         */ IL_014F: br.s      IL_00EF
		// end loop
		/* 0x00000B1D 7A           */ IL_0151: throw

		/* 0x00000B1E DC           */ IL_0152: endfinally
	} // end handler

	/* 0x00000B1F 7E0B00000A   */ IL_0153: ldsfld    native int [mscorlib]System.IntPtr::Zero
	/* 0x00000B24 2A           */ IL_0158: ret

	/* 0x00000B25 08           */ IL_0159: ldloc.2
	/* 0x00000B26 2A           */ IL_015A: ret
} // end of method '‌‌‍‮‬‫‍‪‭‏‭‍‭‪‏‎‍‬‌‌‭‍‌​‬‮'::'‪‭​‭‮‬‬‍‫‮‎‪‫‎‏​‫‬‮‬‎‍​‍‮'

File to decompile:
malware_file.zip

Detect mismatched CPU architecture when starting to debug

Currently dnSpy does not warn the user before attempting to debug a file with a different CPU architecture then the current dnSpy process. When starting to debug dnSpy just starts the process and fails to attach. This can cause unwanted execution of the file’s code. A potential solution would be to create display warning before the process is started stating that the architecture is mismatched and that proceeding will most likely leed to a failed attachment.

Broken action name

using System;
using System.Runtime.CompilerServices;

public class Foo
{
    private static Bar bars;

    [CompilerGenerated]
    private static Action<string> <>f__mg$cache0;

    public static void Action(string str)
    {
    }

    // Note: this type is marked as 'beforefieldinit'.
    static Foo()
    {
        if (Foo.<>f__mg$cache0 == null)
        {
            Foo.<>f__mg$cache0 = new Action<string>(Foo.Action);
        }
        Foo.bars = new Bar(Foo.<>f__mg$cache0, false);
    }
}

Compiling with illegal local variable names, e.g.: CS$<>8__locals1

I'm trying to compile a module but there are a number of variables that are named like this:
CS$<>8__locals1
CS$<>8__locals2
CS$<>8__locals4.CS$<>8__locals3.CS$<>8__locals2.CS$<>8__locals1.<>4__this
Class.<>c__DisplayClass4_0 CS$<>8__locals1 = new Class.<>c__DisplayClass4_0();

Is there a way I can fix these so I can make edits & recompile the module?

Can't attach to .NET 5 application

  • What version did you use?
    dnSpy v6.1.9

  • Write down all steps needed to reproduce this issue. Also attach any needed files.

When trying to attach I see this error box:

image

image

dlls having this attribute:

[assembly: TargetFramework(".NETCoreApp,Version=v5.0", FrameworkDisplayName = "")]

Upgrade to .NET 6.0

dnSpy currently runs on .NET Framework 4.8 and .NET 5.0. We should upgrade and replace .NET 5.0 with .NET 6.0.

Horizontal/tilt scroll support

Some computer mice come with the ability to tilt the scroll wheel to the left or right in order to scroll in horizontal directions. Moreover, Some pieces of mice software also allow users to bind other buttons to horizontal/tilt scrolling. Horizontal/tilt scrolling is currently not supported by dnSpyEx.

Find reference for single enum value

Like original dnSpy you can only find references (Analyze - Used by) for the whole enum but not for a specific enum value. However if its a large and used by many functions but you are only interested in where is a specific value of this enum being used you have to go through all of them which takes a lot of time.

My request is being able to find references where a specifc enum value is being used.

dnSpy-Unity-mono new version

Hey, I am trying to create dnSpy-Unity-mono for version 2020.3, when using the umpatcher i get an error for copying eglib because it is in mono/mono instead of mono.

ANy help would be appreciated.

Feature: Allow selecting arbitrary entrypoint when debugging

Allow the user to start a binary at any supported method by invoking it with a bootstrap executable and reflection. This allows for debugging specific methods of a binary or DLLs.

Inspired by this repo.

Not something I'm waiting for, but a neat idea in case you want to add significant features over dnSpy.

method was removed that is still referenced by this module.

Before clicking Submit new issue, try the latest build

  • What version did you use?
    latest

  • Write down all steps needed to reproduce this issue. Also attach any needed files.
    I loaded up the assembly-csharp.dll from the game Detention
    I tried to edit a method from TextDialogueInterface
    I had this error
    image
    then I moved vector3 parameter to the left to be first
    it did compile
    then when I save the module this happens:
    image

Save / Load / Apply patches

Being able to save your modifications, load and apply them is extremely powerful. Even tools like Ollydb had these feature. If you for example patch a file and this file receives a new update. You dont have to go to each location and redo all your changes. You could instead just load your patch and apply. Even for logging purpose this has a high value, no need to write down all your steps in notepad.

I've made a feature request on original dnSpy and it got many votes but then dnSpy has retired.

.NET 6.0 Crash on Click View in Menu

Before clicking Submit new issue, try the latest build

  • What version did you use?
    Latest 6.1.9 Compiled at 19 December 2021 .NET 6.0

  • Write down all steps needed to reproduce this issue. Also attach any needed files.

Senza titolo

After compiling the .NET 6.0 version the Microsoft.CodeAnalysis.Scripting library is missing

Regards

Compare two assemblies

This is not an easy feature to add but a lot of people are looking forward to this. Being able to compare two assemblies and find differences. There are tools for this already like JustAssembly from Telerik. Or there are recommendation like exporting both assemblies to project files and then use a binary diff tool. However doing this within dnSpy would be a lot easier.

Improve support for CLR Expression Evaluator Intrinsics in debugger

dnSpy currently supports some of the expression evaluator intrinsics defined here: https://github.com/Microsoft/ConcordExtensibilitySamples/wiki/CLR-Expression-Evaluator-Intrinsics. These intrinsic methods are used throughout the expression compiler used by dnSpy's debugger component.

List of intrinsics and their support status:

  • GetObjectAtAddress - Supported for CorDebug engine but not on Mono. Mono implementation is not possible.
  • GetException - Fully supported.
  • GetStowedException - Not supported since the dnSpy debugger doesn't support stowed exceptions yet.
  • GetReturnValue - Supported for CorDebug engine but not on Mono. Mono implementation is not possible.
  • CreateVariable - Not supported.
  • GetObjectByAlias - Supported for all alias kinds except variables.
  • GetVariableAddress - Not supported.

ilspy new branch - OpCode not supported: LdMemberToken

  • What version did you use?
    Latest commit from ilspy new branch.
  • Write down all steps needed to reproduce this issue. Also attach any needed files.
    Some assemblies now get this error in decompiled text: OpCode not supported: LdMemberToken.
    The assembly works in master branch.

Support for .NET Single file publishing.

.NET supports publishing an application into a single native executable file. This executable contains the actual .net assembly, runtime configuration files, symbols, etc. Currently dnSpyEx shows these assemblies as regular native assemblies. dnSpyEx should be able to unpack these types of files and display their contents in the treeview. An option to extract these files into a directory specified by the user could also be implemented.

Dependency Updates

Currently, dnSpy relies on quite old versions of certain libraries. For obvious reasons, the dependencies should be updated.

List of outdated dependencies:

  • ILSpy: tracked by #5
  • Roslyn: Currently dnSpy uses Roslyn 2.10 which should be updated to the latest, as of now 3.11 version. the API has changed from version 2 to 3 so the ExpressionCompiler project and other dnSpy projects will need to be updated for the new API.
  • Mono.Debugger.Soft - dnSpy uses a version of this library from 11th November 2017. Since this library is used heavily by the dnSpy Mono debugger updating it will probably improve that component.
  • VisualStudio Text and Intellisense components - these NuGet packages are also a bit out of date and the newer versions have some API changes which makes an update trickier.
  • ClrMD (Microsoft.Diagnostics.Runtime) - Updating is not possible as it would break compatibility with .NET Framework 2.0, 3.5, and 4.0.

Sponsor Info?

Hello, thank you for forking the now archived dnSpy. Do you have information for donations or how to contribute monetarily? It may be nice to provide this so people like myself can help support this project to avoid it ending like dnSpy did!

Add Save code in File Menu

It is recommended to add save code in file menu in the new version, This function has been implemented in the previous V4.5, but now it has been deleted.

Where is the Unity Mono Debugging thingy?

I can't find the patched mono.dll in the Releases page or anything. Not even on the official dnSpy repo!

PLEASE DON'T DIRECT ME TO THE DNSPY-UNITY-MONO REPO, I don't have time to build it myself!

I just need a build of mono.dll (patched) for Unity 2019.4.15f1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.