Questions tagged [ilspy]

ILSpy is the open-source .NET assembly browser and decompiler.

ILSpy is the open-source .NET assembly browser and decompiler. ILSpy.net

79 questions
15
votes
5 answers

exception has been thrown by a target of invocation in Visual Studio 2013

Today when I opened Visual Studio 2013 Professional Edition, I got the error exception has been thrown by a target of invocation. Also I tried to open ILSpy to debug a dll, but it crashed. I think that it might be from the same killer. For the…
user1108948
14
votes
2 answers

Variables ending with "1" have the "1" removed within ILSpy. Why?

In an effort to explore how the C# compiler optimizes code, I've created a simple test application. With each test change, I've compiled the application and then opened the binary in ILSpy. I just noticed something that, to me, is weird. Obviously…
RLH
  • 15,230
  • 22
  • 98
  • 182
8
votes
1 answer

Odd class member syntax shown in ILSpy

I'm poking around a few dlls within the XNA framework using ILSpy and came across this: class KerningHelper { private void !KerningHelper() { ((IDisposable)this).Dispose(); } } What is the exclamation mark for in the above? Is…
George Duckett
  • 31,770
  • 9
  • 95
  • 162
7
votes
1 answer

How is Task.Delay awaitable if it's not marked async?

I'm looking at Task.Delay(int) decompiled in ILSpy: // System.Threading.Tasks.Task [__DynamicallyInvokable] public static Task Delay(int millisecondsDelay) { return Task.Delay(millisecondsDelay, default(CancellationToken)); } This method is…
rory.ap
  • 34,009
  • 10
  • 83
  • 174
6
votes
4 answers

ILSpy, how to resolve dependencies?

I want to disassemble an entire .NET assembly with ILSpy. I used this code as base: http://skysigal.xact-solutions.com/Blog/tabid/427/entryid/2488/Default.aspx And it works fine, just when I have an assembly that references Npgsql.dll (or any other…
Stefan Steiger
  • 78,642
  • 66
  • 377
  • 442
6
votes
2 answers

Decompiling a .NET Framework v4.5 executable "not .NET assembly file" in dotPeek but executable runs fine

A client has burned bridges with their previous dev and I'm trying to extract source code from what's left of their payroll executable, unfortunately as a web dev I do not have much experience with the .NET framework. EDIT: Our client legally owns…
Helen Che
  • 1,951
  • 5
  • 29
  • 41
5
votes
2 answers

Reinserting XML Comments into a tree of C# source files from the auto generated [assembly].xml files

My Situation: So, I decompiled a .NET assembly with ILSpy into C# last week; since, then, I've put a ton of labour into massaging the files/project, etc. so that they all work correctly again (there were lots of little bugs [mostly caused by ILSpy's…
BrainSlugs83
  • 6,214
  • 7
  • 50
  • 56
5
votes
3 answers

how to use ILspy debug a dll?

i want to use ILspy debug a dll,as pic: but it only can show two process: but in vs2010,i can attach more process: how to show w3wp.exe in ILspy? who can help me?
artwl
  • 3,502
  • 6
  • 38
  • 53
4
votes
3 answers

Can .Net Core 3 self-contained single executable be decompiled?

I tried using Dotpeek and ILSpy.Net to decompile (my own code), they failed. Do I need special obfuscation on distributed binaries of .Net Core 3 self-contained single executable ?
Abhijeet
  • 13,562
  • 26
  • 94
  • 175
4
votes
0 answers

Is this emitted code useful?

While looking through some dll's with ILSpy I came across the following code: void RenderFiles(List> pdfFiles) { int num; for (int i = 0; i < pdfFiles.Count; i = num + 1) { // .... num = i; } } The introduction of the…
Serve Laurijssen
  • 9,266
  • 5
  • 45
  • 98
4
votes
1 answer

Cannot mimic performance of ConcurrentStack when using same code implementation

I am learning about writing concurrent data structures and looking at the ConcurrentStack implementation as a learning exercise. As a starting point I have created a copy of the ConcurrentStack implementation by using IlSpy to decompile it into C#.…
Phil Wright
  • 22,580
  • 14
  • 83
  • 137
3
votes
2 answers

How is a decompiler able to recognize a compiled constant?

I am using ILSpy to decompile the assemblies of .Net and look into the code. As I was browsing the code of System.Windows.Vector.AngleBetween(Vector, Vector) in WindowsBase.dll, I stumbled across something bizarre. This is the full code of the…
AstroRP
  • 267
  • 6
  • 15
3
votes
0 answers

Decompile arbitary IL from an array of bytes in ILSpy

I'm currently working on a compiler(transpiler?) from methbases to C# expression trees which uses ILSpy. The general problem I'm having is linking System.Reflection.MethodBases to the correct methodDeclarations in the NRefactory AST outputted by…
Nick
  • 920
  • 1
  • 7
  • 21
3
votes
1 answer

Why does this .dll have weird letters in ILSpy?

I'm using ILSpy to look at a .dll. A Majority of the classes are in english, but some of the classes are in the weird letters that I can't explain. I'm wondering if there is an error with the .dll or ILspy or if you it needed to be decompiled…
jackson5
  • 31
  • 1
3
votes
1 answer

Decompiling IEnumerators

Out of curiosity I decided to try decompiling my project's code. I took the Assembly .dll file and used ILSpy to decompile it. It seems to be working correctly, except for IEnumerator<> methods. IEnumerator sP() { for (int i = 0; i <…
Reynevan
  • 1,475
  • 1
  • 18
  • 35
1
2 3 4 5 6