I just need to search for bits of text in my C# code.
I already have .NET Reflector and the File Disassembler Add-In, but these just seem to decompile one DLL.
I just need to search for bits of text in my C# code.
I already have .NET Reflector and the File Disassembler Add-In, but these just seem to decompile one DLL.
Actually, none of these answers are right.
Yeah, all the tools can decompile *.dll
files into *.csproj
file but none of them supports CLI or batch processing. You can save yourself the time with installations.
The best possible solution so far is use dotPeek, put all *.dll
files into one folder and use Explore Folder option.
dotPeek will analyse the given folder and shows a tree of DLL
s located inside the folder. You can generate csproj
manually for every single dll
which is loaded.
If you came across this post because you are looking answer how locate specific instruction in your or 3rd party dll
s, specially a use of reflection, you can use this PowerShell script to decompile dll
s into IL and look for the instruction (System.Reflection.Assembly::Load(string)
for reflection).
It is using Intermediate Language DisASseMbler (ILDASM) from .NET Framework SDK kit. Adjust the path accordingly to your version of SDK.
function Get-LibDump
{
Param(
# Specifies a path to one or more locations. Wildcards are permitted.
[Parameter(Mandatory=$true,
Position=0,
ParameterSetName="Basic",
ValueFromPipeline=$true,
ValueFromPipelineByPropertyName=$true,
HelpMessage="Path to one or more locations.")]
[ValidateNotNullOrEmpty()]
[SupportsWildcards()]
[ValidateScript({$_ | Test-Path})]
[System.IO.FileInfo]
$Path
)
process
{
$dumpFileFilePath = $Path.BaseName + '.il'
$outFile = "C:\LibDump\$dumpFileFilePath"
Start-Process -FilePath 'c:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.2 Tools\ildasm.exe' -ArgumentList "/UNICODE /OUT=`"$outFile`" `"$($Path.FullName)`"" -Wait
"Dump from:`n$(Resolve-Path -Path $Path.FullName -Relative)" | Out-File -FilePath $outFile -Encoding:unicode -Append
}
}
# Use
Get-ChildItem -Path $PathToLibFolder -Filter '*.dll' -File -Recurse | Get-LibDump
© 2022 - 2024 — McMap. All rights reserved.