There are many .NET decompilation tools, such as ILSpy and dnSpy, all of which open software, select local dlls for decompilation, and view the source code.
Is there any direct decompilation of the source code of the current website online? First, the following rendering is to decompile the current source code online and view the source code:
When there are too many source code branches, each branch may be different, and it is very troublesome to copy the server's dll locally for decompilation each timeThe article takes .NET Framework 4.6.2 as an example to decompile the source code online, limited to .NET Framework dlls.
First, get the assembly that the current application is loaded with, which is all the DLLs, as shown in the image below:
Source:
By selecting the drop-down list name of the assembly as the parameter input method, you can get all types of the assembly (We need to remove the object elements that the compiler generates for us, otherwise there will be many anonymous objects), as shown in the figure below:
The source code is as follows:
Finally, the core of the article, by selecting the assembly and object type, obtain the source code, as shown in the figure below:
Using the package console, install the plugin ICSharpCode.Decompiler with the nuget command, the core of the well-known ILSpy decompiler tool is to call the plugin, the command is as follows:
We use the assembly name and object type name as parameters and pass them in the following method to view the source code.
Decompiling the dll source code
(End)
|