I've only just started using ILSpy,the dll is compined with Unity Self,and i just drag the Assembly-CSharp.dll into ILSpy,I have searched for a long time but nothing leaned.Is there some setting i need?
Asked
Active
Viewed 537 times
0
-
Welcome to SO. See this [question](https://stackoverflow.com/questions/64868167/why-my-ilspy-shows-a-different-version-of-code) for some clues. – Anand Sowmithiran Nov 20 '21 at 18:05
-
you need to de compile the code, maybe use reflector. – Abdur-Rehman M Nov 20 '21 at 18:12
-
Try dotPeek or dnSpy – Charlieface Nov 21 '21 at 05:26
2 Answers
2
In the top menubar of ILSpy you can see a combobox/dropdown, which selects the decompiler's output target language. I suspect it is set to IL
in your case. Change its value to C#, and your situation should improve...
-
thanks a lot ,this really help ... i cant believe i ask such a stuip quesiton... thanks again.. – Logarius Nov 21 '21 at 07:44
0
What do you even mean?
C# code is COMPILED INTO IL CODE.
IL Code does not look like C# code because it is another language. If you drag an assembly into ILSpy it can only show you the IL - why on earth would it show you anything that even remotely looks like C# Code? ILSpy is there to show you the IL Code - you can not make that IL Code look like C# code. This is like "how do I make English follow German syntax".
Now, there are decompilers. The answer for them is: Write IL code as the compiler would.

Charlieface
- 52,284
- 6
- 19
- 43

TomTom
- 61,059
- 10
- 88
- 148
-
IlSpy is also a decompiler as descriped in [Microsoft store](https://www.microsoft.com/en-us/p/ilspy/9mxfbkfvsq13?activetab=pivot:overviewtab) "ILSpy is the open-source .NET assembly browser and **decompiler**" – Ibram Reda Nov 20 '21 at 18:13