I want to decompile a dll created using visual studio c# but not a .NET dll. .NET Reflector is declaring "Not a .NET decompiler". IS there any other decompiler existing?
-
1Your error message is bogus. Please correct it. – leppie Jan 22 '13 at 08:46
3 Answers
Are you sure the error message isn't "Not a .NET assembly" ? (or something like that); .NET reflector is very much a .NET decompiler.
If you created it with "visual studio c#", then it is a .NET assembly. It knows nothing else. Are you sure it isn't obfuscated? Are you sure it was created from "visual studio c#"?
You can try it in "ildasm" to quickly see what is in there.
My suspicion is that the file you are trying to read is nothing to do with .NET, and is not a .NET assembly. Maybe some C/C++/java/anything else/...

- 1,026,079
- 266
- 2,566
- 2,900
-
Even if it obfuscated, it still needs to be MSIL to be executed by the CLR, so it should be possible to open it in Reflector, or ILDasm... – Lorenzo Dematté Jan 22 '13 at 08:47
-
@dema80: Some obfuscated assemblies are changed in a way that prevents Reflector from opening them - at least that has been the case 2 years ago. I assume they are invalid according to the specification but will still run because the .NET runtime isn't as strict. – Daniel Hilgarth Jan 22 '13 at 08:49
-
may be.. but I am pretty sure ILDasm will open them nonetheless.. And I bet the problem is that the DLL is not an assembly at all :) – Lorenzo Dematté Jan 22 '13 at 08:50
-
@dema80: I don't know about ILDasm, but I tend to agree. And yes, looking at the question, the OP most likely tried to open something else. – Daniel Hilgarth Jan 22 '13 at 08:51
Have a look at DotPeek from Jetbrains it is free and does the job.

- 1,839
- 1
- 31
- 42
-
4Not sure this is the issue; if Reflector can't even touch it, then I don't think DotPeek will either. My suspicion is that the file isn't a .NET assembly at all. – Marc Gravell Jan 22 '13 at 08:48
-
@MarcGravell You are probably right, my first thought though was dotpeek. Should I remove the answer? – The_Cthulhu_Kid Jan 22 '13 at 08:58
How can a DLL created with C# not be .NET dll? As far as I know, C# only compiles to MSIL (for now..), so the dll must be a ".NET dll" (an assembly). Or are you talking about C++, perhaps?
You should check, first of all, if the dll is managed (.NET) or unmanaged. I used to use pedump for the job, but that was ages ago. You should look for such a tool, and then act accordingly. If it is an unmanaged DLL, you need to use a different (and much more complex) technique to decompile it.

- 7,638
- 3
- 37
- 77