ILSpy | NET Decompiler with support for PDB generation | Reverse Engineering library

 by   icsharpcode C# Version: v8.0 License: No License

kandi X-RAY | ILSpy Summary

kandi X-RAY | ILSpy Summary

ILSpy is a C# library typically used in Utilities, Reverse Engineering applications. ILSpy has no bugs, it has no vulnerabilities and it has medium support. You can download it from GitHub.

ILSpy is the open-source .NET assembly browser and decompiler. Download: latest release | latest CI build (master) | Microsoft Store (RC & RTM versions only).
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              ILSpy has a medium active ecosystem.
              It has 17990 star(s) with 3135 fork(s). There are 707 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 193 open issues and 2041 have been closed. On average issues are closed in 246 days. There are 4 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of ILSpy is v8.0

            kandi-Quality Quality

              ILSpy has 0 bugs and 0 code smells.

            kandi-Security Security

              ILSpy has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              ILSpy code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              ILSpy does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              ILSpy releases are available to install and integrate.
              Installation instructions are available. Examples and code snippets are not available.
              It has 304 lines of code, 2 functions and 1193 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ILSpy
            Get all kandi verified functions for this library.

            ILSpy Key Features

            No Key Features are available at this moment for ILSpy.

            ILSpy Examples and Code Snippets

            No Code Snippets are available at this moment for ILSpy.

            Community Discussions

            QUESTION

            Can't use GitHttpClient from Powershell, Newtonsoft.Json version conflict
            Asked 2022-Apr-01 at 14:35

            I'm trying to consume Azure DevOps .NET API, specifically the Git client, from Powershell 5.1. There is a copy of all client libraries under C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer.

            So first I tried that in a C# program:

            ...

            ANSWER

            Answered 2022-Apr-01 at 14:35

            Preamble: the dependency resolution in the C# program was not picking up v12 where v9/6 was requested automagically; it was only doing so because the config file of the compiled program was telling it so, and that only happened once and because Newtonsoft v12 was being referenced in the project. Thanks to @n0rd for pointing that out. Resolving strongly named dependent assemblies to a higher major version is not a default behavior in .NET 4.5-8.

            Modifying the config of Powershell to achieve the same might be possible, but I didn't go there. The original piece that needed this logic will be eventually running on servers that I don't control, so the less administrative overhead, the better. Now, for the working answer.

            You can provide a resolve handler in Powershell 5 after all, telling .NET to use the loaded version of Newtonsoft in lieu of any other one. It goes like this:

            Source https://stackoverflow.com/questions/71356583

            QUESTION

            How to use a Java .dll in C# .NET Core 6?
            Asked 2022-Mar-06 at 13:54
            Initial situation

            I've made a little test for my project today - The goal: Implement .jar files into a C# project as a .dll. My current .java / .jar file looks like the following.

            ...

            ANSWER

            Answered 2022-Mar-03 at 15:48

            First of all, you are using a class as a namespace, and that is probably not correct. Your method call should probably look something like this:

            Source https://stackoverflow.com/questions/71339714

            QUESTION

            C# array access from first element only
            Asked 2022-Feb-03 at 14:17

            I'm sorry if this has been asked before, but I don't even know what to search for to find an answer.

            I'm fairly experienced in .net/c# etc., however, I have come across something I don't understand how works.

            I'm working on a third party library where I do not have access to the source.

            My question is: How is this function able to get the whole data in the array when only the first value is being passed?

            Prototype:

            ...

            ANSWER

            Answered 2022-Feb-01 at 20:42

            An array is a contiguous bit of memory, calling a function like this:

            Source https://stackoverflow.com/questions/70944981

            QUESTION

            Could not find the IHttpModule if I install it to the GAC cache
            Asked 2021-Dec-18 at 14:40

            I have a simple IHttpModule

            ...

            ANSWER

            Answered 2021-Dec-18 at 14:40

            The PublicKeyToken is null, which mean the DLL is not signed with a strong name. You need to sign the Dll and then put it to GAC, please refer the MSDN article here, the article also tells you how to sign it in VS:

            Source https://stackoverflow.com/questions/70400390

            QUESTION

            ILSpy decompile a delegate
            Asked 2021-Dec-16 at 12:58

            ILSpy can decompile assemblies. Can it decompile a delegate? I would imagine a CSharpDecompiler constructor overload accepting a Func or an Action as an argument instead of a "string fileName". Is it technically feasible, are there any future plans to support this? Any suggested work-arounds?

            Example of what I had in mind....

            ...

            ANSWER

            Answered 2021-Dec-16 at 09:46

            An official ILSpy member has answered in the project's discussion section:

            "It's not possible, because the decompiler requires a full PE image containing IL code and .NET metadata tables"

            https://github.com/icsharpcode/ILSpy/discussions/2581

            Source https://stackoverflow.com/questions/70365751

            QUESTION

            How to disassemble single file .NET exes, or extract the .dll from them?
            Asked 2021-Nov-16 at 17:38

            I'm have some .NET exes built with the single file option (https://docs.microsoft.com/en-us/dotnet/core/deploying/single-file) and I need to use a disassembler on them, but none of the disassembly tools (e.g. dnspy, ilspy, ildasm, etc.) work since these are actually native binaries with .NET assembly embedded in them, as explained in the Microsoft docs.

            E.g., trying ildasm on these binaries outputs error: 'example.exe' has no valid CLR header and cannot be disassembled

            How can I extract the .NET dlls from these single file exes so that I can disassemble them? Or is there any other way to disassemble these .NET single file exes?

            ...

            ANSWER

            Answered 2021-Nov-16 at 17:38

            ILSpy 7.0 supports .NET 5 single-file bundles.

            ILSpy 7.1 adds support for .NET 6 bundles (added compression support).

            ILSpy 7.2 also allows saving the embedded .dlls ("Extract package entry" in context menu).

            If you're looking for a command-line tool, see https://www.nuget.org/packages/sfextract/

            Source https://stackoverflow.com/questions/69980886

            QUESTION

            Why does my async method builder have to be a class or run in Debug mode?
            Asked 2021-Sep-30 at 19:46

            I'm trying to implement my own async method builder for a custom awaitable type. My awaitable type is just a struct containing a ValueTask.

            The problem is my asynchronous method builder only works when it's a class or compiled in Debug mode, not a struct and in Release mode.

            Here's a minimal, reproducible example. You have to copy this code into a new console project on your local PC and run it in Release mode; .NET Fiddle apparently runs snippets in Debug mode. And of course this requires .Net 5+: https://dotnetfiddle.net/S6F9Hd

            This code completes successfully when CustomAwaitableAsyncMethodBuilder is a class or it is compiled in Debug mode. But it hangs and fails to complete otherwise:

            ...

            ANSWER

            Answered 2021-Sep-30 at 19:46

            Found it! If you use ILSpy to disassemble the .dll compiled from the question's code (use the .NET Fiddle link and follow the question's instructions), and then turn ILSpy's language version down to C# 4 (which was the version before async/await was introduced), then you'll see that this is how the GetValueAsync method is implemented:

            Source https://stackoverflow.com/questions/69396896

            QUESTION

            Is setting by reference local variable equivalent to helper function I have created
            Asked 2021-Sep-21 at 07:28

            I have the following code created after using ILSpy on a DLL:

            ...

            ANSWER

            Answered 2021-Sep-21 at 00:40

            The answer, as @Jeroen Mostert mentioned in the comments, is to extract the code into a separate method, so it is not part of the for loop:

            Source https://stackoverflow.com/questions/69258452

            QUESTION

            How to load exe with reflection if exe does not have a manifest?
            Asked 2021-Jul-26 at 13:47

            I have a dump of an executable file (Runtime: v2.0.50727). It works well without any mistakes. I could load it to DnSpy to debug or to ILSpy. Both of them tells that all references successfully resolved.

            However, I can't load it using this code:

            ...

            ANSWER

            Answered 2021-Jul-26 at 13:47

            The .bin file you created tracks back to COFF, which .NET 2.0 runtime uses. You can also use dumpbin, to get a .bin file. The documentation states

            The Microsoft COFF Binary File Dumper (DUMPBIN.EXE) displays information about Common Object File Format (COFF) binary files.

            So, to properly load that, you will need to use Assembly.Load(byte[], ...). That documentation states that its parameter accepts a raw COFF array of bytes:

            A byte array that is a COFF-based image containing an emitted assembly.

            This part from the above source may also be relevant to you

            Reflecting on C++ executable files might throw a BadImageFormatException. This is most likely caused by the C++ compiler stripping the relocation addresses or the .reloc section from your executable file. To preserve the .reloc address for your C++ executable file, specify /fixed:no when you are linking.

            Source https://stackoverflow.com/questions/68529630

            QUESTION

            OnEntry method not working, when using postsharp for AOP
            Asked 2021-Jun-08 at 14:27

            Hi I am trying to use postsharp aspect for validation. FluentValidationAspect does not working for OnEntry method. (postsharp v6.9.6)

            FluentValidationAspect

            ...

            ANSWER

            Answered 2021-Jun-08 at 14:27

            Each project in which PostSharp aspects are applied needs to have the PostSharp NuGet package installed.

            Source https://stackoverflow.com/questions/67860348

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install ILSpy

            Note: Visual Studio 16.3 and later include a version of the .NET (Core) SDK that is managed by the Visual Studio installer - once you update, it may get upgraded too. Please note that ILSpy is only compatible with the .NET 6.0 SDK and Visual Studio will refuse to load some projects in the solution (and unit tests will fail). If this problem occurs, please manually install the .NET 6.0 SDK from here.
            Clone the ILSpy repository using git.
            Execute git submodule update --init --recursive to download the ILSpy-Tests submodule (used by some test cases).
            Install Visual Studio (documented version: 16.9). You can install the necessary components in one of 3 ways: Follow Microsoft's instructions for importing a configuration, and import the .vsconfig file located at the root of the solution. Alternatively, you can open the ILSpy solution (ILSpy.sln) and Visual Studio will prompt you to install the missing components. Finally, you can manually install the necessary components via the Visual Studio Installer. The workloads/components are as follows: Workload ".NET Desktop Development". This workload includes the .NET Framework 4.8 SDK and the .NET Framework 4.7.2 targeting pack, as well as the .NET 6.0 SDK (ILSpy.csproj targets .NET 4.7.2, and ILSpy.sln uses SDK-style projects). Note: The optional components of this workload are not required for ILSpy Workload "Visual Studio extension development" (ILSpy.sln contains a VS extension project) Note: The optional components of this workload are not required for ILSpy Individual Component "MSVC v142 - VS 2019 C++ x64/x86 build tools (v14.23)" (or similar) The VC++ toolset is optional; if present it is used for editbin.exe to modify the stack size used by ILSpy.exe from 1MB to 16MB, because the decompiler makes heavy use of recursion, where small stack sizes lead to problems in very complex methods. Open ILSpy.sln in Visual Studio. NuGet package restore will automatically download further dependencies Run project "ILSpy" for the ILSpy UI Use the Visual Studio "Test Explorer" to see/run the tests If you are only interested in a specific subset of ILSpy, you can also use ILSpy.Wpf.slnf: for the ILSpy WPF frontend ILSpy.XPlat.slnf: for the cross-platform CLI or PowerShell cmdlets ILSpy.AddIn.slnf: for the Visual Studio plugin
            Make sure .NET 6.0 SDK is installed.
            Make sure PowerShell is installed (formerly known as PowerShell Core)
            Clone the repository using git.
            Execute git submodule update --init --recursive to download the ILSpy-Tests submodule (used by some test cases).
            Use dotnet build ILSpy.XPlat.slnf to build the non-Windows flavors of ILSpy (.NET Core Global Tool and PowerShell Core).

            Support

            Current and past contributors.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries

            Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Reverse Engineering Libraries

            ghidra

            by NationalSecurityAgency

            radare2

            by radareorg

            ILSpy

            by icsharpcode

            bytecode-viewer

            by Konloch

            ImHex

            by WerWolv

            Try Top Libraries by icsharpcode

            SharpZipLib

            by icsharpcodeC#

            SharpDevelop

            by icsharpcodeC#

            AvalonEdit

            by icsharpcodeC#

            AvaloniaILSpy

            by icsharpcodeC#

            WpfDesigner

            by icsharpcodeC#