Siegfried Pammer
35440d9974
Remove LoadedAssembly.WaitUntilLoaded
3 years ago
Siegfried Pammer
4b475cfa69
Create ILSpyX project and make the following APIs reusable:
...
- AssemblyList, AssemblyListManager, AssemblyListSnapshot
- LoadedAssembly
- LoadedPackage and friends
- PDB providers
3 years ago
Siegfried Pammer
31f6be38b5
Fix nullability warnings
3 years ago
Siegfried Pammer
669b48b609
Add AssemblyListSnapshot.TryGetSimilarModuleAsync
3 years ago
Siegfried Pammer
11fbb2610d
#2594 : Introduce AssemblyListSnapshot to avoid expensive and repetitive LoadedAssembly.CreateLoadedAssemblyLookupAsync calls
3 years ago
Siegfried Pammer
e823ed9966
#2594 : Cache LoadedAssembly.GetTargetFrameworkIdAsync, LoadedAssembly.GetRuntimePackAsync, PEFile.Name, PEFile.FullName to improve performance of assembly resolving. This improves performance of the analysis by a factor of 2.
3 years ago
Siegfried Pammer
27f56a9253
Use ArrayPool<byte>.Shared for decompression.
4 years ago
Siegfried Pammer
6cda7cceb1
Use FileName parameter instead of LoadedAssembly.fileName
4 years ago
Christian Prähauser
95f9908823
Ensure we read all of compressed data in LoadCompressedAssembly
4 years ago
Christian Prähauser
39d230f022
Support loading compressed Xamarin assemblies, see #2137
...
Extend class LoadedAssembly to detect and load compressed Xamarin assemblies if direct loading of assembly fails.
Requires Nuget pkg K4os.Compression.LZ4 for LZ4 decompression.
4 years ago
Daniel Grunwald
6757295b3b
Fix #2379 : Keep `return` statements around in original form for ConditionDetection, only transform to fall-through block-exit at the end of the transform pipeline.
...
This fixes an issue where `return` statements within try-blocks could turn into `goto` statements.
4 years ago
Daniel Grunwald
46e9f633ca
#enable nullable in AssemblyList + DecompilerTextView
4 years ago
riQQ
95bd57c888
Fix warning CS8625
...
Fix warning CS8625: Cannot convert null literal to non-nullable reference type.
4 years ago
Siegfried Pammer
5734da4294
Fix #2314 : ILSpy incorrectly resolves a runtime dependency when dll is present in both WindowsDesktop.App and NETCore.App
4 years ago
Siegfried Pammer
5740068753
Fix #2310 : Do not set mainAssemblyFileName in UniversalAssemblyResolver in case LoadedAssembly.FileName is not a full path.
4 years ago
Daniel Grunwald
281586de1f
`#enable nullable` for a couple of files.
...
Includes some fixes for potential NullReferenceExceptions.
4 years ago
Daniel Grunwald
2f14cde050
#2295 : Handle BadImageFormatException in LoadAssembly.
...
When nuget packages are <40 KB, SRM seems to throw `BadImageFormatException` instead of `PEFileNotSupportedException`.
4 years ago
Daniel Grunwald
263d9b9e07
Simplify the assembly-resolving implementation.
...
* We no longer maintain the weird `loadingAssemblies` global state.
* AssemblyList now internally handles multiple concurrent load requests for the same filename.
* AssemblyList.assemblies and its lock is now private to the AssemblyList.
* Removed a questionable caching layer (cache was per-AssemblyList, but was caching the result of a per-LoadedAssembly lookup function.
* Replaced static DisableAssemblyLoad() with bool-parameter on GetAssemblyResolver() call.
4 years ago
Daniel Grunwald
3664e36e3e
Fix GetAssemblyReferenceClassifier() not initializing the universalResolver.
4 years ago
Daniel Grunwald
d70bfe80d5
Add ResolveAsync() method to IAssemblyResolver interface.
...
DecompilerTypeSystem uses this to resolve/load multiple assemblies in parallel.
Unfortunately this doesn't gain us any performance yet in ILSpy because there we have a global assembly-loader-lock :(
4 years ago
Daniel Grunwald
687bca88f3
LoadedAssembly.GetPEFileOrNull(): avoid unnecessary throw+catch when called on bundles.
...
This improves ILSpy performance when run inside the debugger.
4 years ago
Siegfried Pammer
924e7a0ec4
Fix "Select PDB" command when working with bundles.
5 years ago
Daniel Grunwald
82bb805657
Don't show PDB context menu entries on bundle nodes.
5 years ago
Daniel Grunwald
0de6238d65
Support resolving assembly references within a bundle.
5 years ago
Daniel Grunwald
b2cbb12f15
Thread-safety for LoadedAssembly.GetTypeSystemOrNull()
5 years ago
Siegfried Pammer
f0012cbc1a
#2198 : Make ILSpy more resilient in case of obfuscated assemblies.
5 years ago
Daniel Grunwald
a354b32a16
Add support for .NET bundles.
5 years ago
Daniel Grunwald
f74d3c40a9
Add NuGet packages (and other files) to TreeView
5 years ago
文煌
d612008c9f
write OutputType for asp.net library
5 years ago
文煌
e8e0f89f6d
don't write HintPath for .NET Core shared assembly
5 years ago
dotnet format
0d9f871a4f
#2128 : Reformat the whole code base.
5 years ago
Siegfried Pammer
4b865c27e4
Fix #2076 : VS AddIn opens reference assembly.
5 years ago
Siegfried Pammer
4f8c588c7b
Fix #2068 : ILSpy can't find referenced library even though it's open
5 years ago
dymanoid
b492a20442
Move assembly resolution logic to better place
...
WholeProjectDecompiler shall not care about checking whether an assembly
is in GAC.
5 years ago
Siegfried Pammer
60e9c204cc
Fix #1940 : Make sure that we use the correct .NET Core version, when there are multiple frameworks loaded in the current assembly list.
5 years ago
Siegfried Pammer
69a863957c
Fix #1977 : Add tests for analyzers
5 years ago
Siegfried Pammer
1ff1ade8e7
Add "(.netmodule)" to treenode, if the LoadedAssembly instance represents a .netmodule
5 years ago
Siegfried Pammer
da33002c66
Fix #1504 : Selected decompiler settings should affect tree view and tooltips
5 years ago
Siegfried Pammer
82f048d497
Add "Select PDB..." context menu item on assemblies, to be able to manually load a PDB for an assembly.
5 years ago
Siegfried Pammer
a2bce0b560
Delay initialization of LoadedAssembly.universalResolver
5 years ago
Siegfried Pammer
6ac56bbc74
Refactor IAssemblyReference and IAssemblyResolver implementations in LoadedAssembly.
5 years ago
Siegfried Pammer
306ef615e3
Update comments in LoadedAssembly.
5 years ago
Siegfried Pammer
597ee991a2
Fix #1676 : Add pdb support to powershell and command-line frontends
...
derived from work by @an-dr-eas-k in #1679
6 years ago
Siegfried Pammer
d0f32b93c1
Make sure mappingInfo is not null when passed to typedefs, methoddefs, properties and events.
6 years ago
SilverFox
8c8dcf5630
Fix issue #1762
6 years ago
Christoph Wille
ba22906b3b
Fix obvious .Result errors (there are more instances of calling .Result that would need investigation)
6 years ago
Siegfried Pammer
da1fb59c82
Reformat code in LoadedAssembly.LoadAssembly
6 years ago
Daniel Grunwald
ab4e05f783
Don't perform DetectCatchWhenConditionBlocks transform when catchBlock.Variable.Type setter would throw an exception due to differing stack types.
6 years ago
Daniel Grunwald
962a0365a2
Fix race condition in NavigateOnLaunch():
...
commandLineLoadedAssemblies is only usable from the main thread; so pass this list into NavigateOnLaunch()/FindEntityInRelevantAssemblies() via parameter.
6 years ago
Siegfried Pammer
fac1a4d115
Fix #1311 : Methods in .winmd files compiled from C# don't show up in individual method view in ILSpy 4.
...
Add an option to disable application of WinRT projections.
7 years ago