Commit Graph
132 Commits
Author SHA1 Message Date
Christoph Wille cdeae656fe NuGet August 2026 Updates (#3981)
* Set v11 RTM
* Update features in README.md
* Remove the two 900-iteration process-list scroll tests
* Keep Svg.Controls.Skia.Avalonia at 12.0.0.13
* 10.0.11 and Roslyn for net11p7
* Fix module-scan test failing when PowerShell's NGen images are stale
* Opt Pack NuGets out of the MSBuild server to fix SBOM generation
2026-08-11 21:56:11 +02:00
Christoph Wille bc8b1d1893 Avalonia 12.1.1 and Dock 12.1.0 2026-08-01 10:47:42 +02:00
Siegfried Pammer 4ff11dd796 Add a hover-only reference mode, distinct from local highlighting
References had two behaviors encoded in one bool: navigable links, and
"local" references that are non-navigable but highlight all occurrences
on click. Synthesized dynamic members were routed through the latter, so
they picked up the occurrence highlight even though each use is a
distinct synthetic member with nothing to group.

Model the three modes explicitly with a ReferenceMode enum on
ReferenceSegment (Link / LocalHighlight / HoverOnly). Dynamic members,
the dynamic constructor and the dynamic keyword now use HoverOnly: they
still show a hover tooltip (BuildHoverContent resolves any IEntity
reference regardless of mode) but get the arrow cursor, do not navigate,
and do not highlight. Local variables keep LocalHighlight. Plumbed via a
new isHoverOnly flag on ITextOutput.WriteLocalReference.

Assisted-by: Claude:claude-fable-5:Claude Code
2026-07-23 06:32:02 +02:00
Christoph Wille b888153f24 NuGet 07/26 updates and .NET 11 P6 Roslyn 2026-07-14 20:46:08 +02:00
Christoph Wille 71b71b5534 Avalonia 12.1 2026-07-10 17:18:57 +02:00
Siegfried Pammer 07d5a01d2b Add license headers to source files that lacked them
Backfills the standard MIT X11 header on hand-written files that never
got one, attributing each to its first-commit author and year from git
history. Code vendored from dotnet/runtime and Humanizr/Humanizer gets
its origin's license lines and a provenance note instead. Generated
files (Resources.Designer.cs, the version-info template), tool-managed
suppression files, and BAML test-case fixtures intentionally stay
header-less.

Assisted-by: Claude:claude-fable-5:Claude Code
2026-07-05 21:09:46 +02:00
Siegfried Pammer 17b3539a20 Add a per-assembly target-framework override for reference resolution
ILSpy resolves an assembly's references against the target framework it
detects from the TargetFrameworkAttribute. When that attribute is missing,
wrong, or the user wants to force a different framework, there was no way to
hint the correct one, so references could resolve against the wrong runtime
pack or framework directory.

A LoadedAssembly can now carry a TargetFrameworkIdOverride that short-circuits
detection (it is the single value every LoadedAssembly-based resolution path
reads), is persisted in the assembly-list XML, and is carried across a reload
so a runtime change re-resolves against the new framework. The "Set Target
Framework" context-menu entry edits it through a dialog with a free-form text
box and an always-visible list of common monikers to pick from (the app forces
overlay popups, so a dropdown would be clamped inside the small dialog); input
is validated and converted from the short TFM users know (net48) to the long
FrameworkName form the resolver consumes (.NETFramework,Version=v4.8) via
NuGet. The direct DetectTargetFrameworkId callers in the decompiler core
(project export, language version) intentionally keep reading the real
attribute; only reference resolution is overridden.

Resurrects a 2020 prototype (branch tfmoverride) re-implemented against the
current ILSpyX/Avalonia code, whose surrounding structures no longer matched.

Assisted-by: Claude:claude-opus-4-8:Claude Code
2026-07-01 05:50:11 +02:00
Siegfried Pammer 28b682262c Syntax-colour analyzer signatures with bold type names
The Analyze panel showed each signature as a flat string, so the type names
that carry the key information were hard to spot in long Used-By / Uses lists.
Render analyzer entity rows as syntax-highlighted rich text with the type-name
spans emboldened (issue #2164).

Replace Language.GetRichTextTooltip(entity) with a general
GetRichText(entity, conversionFlags, boldTypeNames): the hover tooltip is one
caller, the analyzer pane another. C# colours the signature via
CSharpHighlightingTokenWriter and bolds the type-name colour spans; IL renders
its disassembled header (its signature form), already lexically highlighted;
the base produces plain text. The IL method/type/field header is semantically
the same artifact as the C# signature, so it shares the one method.

Rendering is opt-in: nodes that want rich labels implement IRichTextNode, and
the single shared SharpTreeView cell renders its runs via the new RichNodeText
attached behaviour, falling back to the plain Text otherwise. SharpTreeNode.Text
stays the authoritative plain string, so search, copy and keyboard navigation
are unchanged; analyzer entity nodes derive Text from the same RichText so the
two never diverge.

Fixes #2164

Assisted-by: Claude:claude-opus-4-8:Claude Code
2026-06-24 21:40:55 +02:00
Siegfried Pammer 51aafa0fd9 Move ILSpy UI code back to the ICSharpCode.ILSpy root namespace
The Avalonia port had placed the UI app in an ILSpy.* namespace tree,
while the csproj RootNamespace and every prior release (through 10.1)
use ICSharpCode.ILSpy.*. Restoring the historical namespace reduces the
public API diff against release/10.1 for plugin authors and removes the
shadowing that forced global:: qualifiers in the test project. The
Images class and AccessOverlayIcon enum move back into the root
namespace (as in 10.1), since an ICSharpCode.ILSpy.Images namespace
would shadow the Images class for all code inside ICSharpCode.ILSpy.

Assisted-by: Claude:claude-fable-5:Claude Code
2026-06-12 21:12:07 +02:00
Christoph Wille 358ec20dd9 Add Open from NuGet feed dialog for browsing and opening packages
Opening a package from a feed previously meant downloading the .nupkg by
hand and using File > Open (#2313). The new File menu command searches any
public V3 feed (editable package-source list, persisted as an MRU in the
ILSpy settings), offers the latest 100 versions in a dropdown, and downloads
into the NuGet global packages folder so the cache is shared with every
other NuGet consumer on the machine and nothing is fetched twice. The cached
.nupkg is then opened exactly like the regular Open command. Feed access
sits behind INuGetFeedClient so the headless test suite covers search,
paging, version selection, download, cancellation, and error surfacing
without touching the network.

Assisted-by: Claude:claude-fable-5:Claude Code
2026-06-10 21:51:56 +02:00
Christoph Wille da57bad452 Merge pull request #3758 from icsharpcode/christophwille/nu0626
NuGet June 2026 Updates
2026-06-10 16:21:11 +02:00
Siegfried Pammer 87748e0cde Override vulnerable transitive packages from the DiaSymReader chain
The Microsoft.DiaSymReader / .PortablePdb packages pull NETStandard.Library
1.6.1, which drags in 4.3.0 builds of System.Net.Http, System.Private.Uri
and System.Text.RegularExpressions, all carrying known advisories (NU1902/
NU1903). They are framework-provided at runtime on net10.0; pin the patched
4.3.4 / 4.3.2 / 4.3.1 via central transitive pinning so NuGet audit passes.
Enabling transitive pinning also aligns a handful of other transitive
packages to their declared central versions.

Assisted-by: Claude:claude-opus-4-8:Claude Code
2026-06-10 00:11:56 +02:00
Siegfried Pammer 8488e5e214 Reference DiaSymReader on every OS so the lock file is OS-stable
The Pdb2Xml command (ILSpy) and the PDB round-trip tests (Decompiler.Tests)
reference Microsoft.DiaSymReader*, previously gated on the build host being
Windows. That made dotnet restore resolve a different graph on Windows than
on Linux -- the packages (and their transitive tail: DiaSymReader.PortablePdb,
the legacy NETCore.Platforms/Win32 packages) appear only on Windows, and
DiaSymReader.Native flips between Direct and CentralTransitive. So a checkout
could not be developed across OSes without the committed packages.lock.json
churning on every Windows restore.

Drop the OS gate (keep Debug-only) so the restored graph, and the committed
lock, are identical on every OS. The consuming code is still gated by DEBUG
and WINDOWS, so on non-Windows the packages are restored but never compiled
in; the native asset only resolves for win-* RIDs.

The "Verify package contents" step (which checks the committed *.filelist
snapshots still match the built VSIX/MSI contents) had been excluding
packages.lock.json from its git diff to tolerate that per-OS churn. With the
locks now identical across OSes the carve-out is unnecessary, so it goes back
to a plain git diff --exit-code.

Assisted-by: Claude:claude-opus-4-8:Claude Code
2026-06-10 00:11:55 +02:00
Siegfried Pammer 667f6ad5f8 Add pwsh dev scripts, repo-wide lock files, and CI NuGet caching
Replace the Windows-only .bat helpers (clean / debugbuild / releasebuild /
restore / updatedeps and BuildTools/format) with cross-platform pwsh
scripts at the repo root: restore.ps1, build.ps1 (-Configuration), clean.ps1,
updatedeps.ps1 and BuildTools/format.ps1, alongside the existing publish.ps1.

Enable a packages.lock.json for every project by hoisting
RestorePackagesWithLockFile into the root Directory.Build.props (the four
core libraries set it individually before) and commit the generated locks,
so restores are repeatable and CI can cache packages off them.

Cache the NuGet packages folder in the three setup-dotnet workflows
(build-ilspy, build-frontends, codeql-analysis), keyed on the lock files
per the setup-dotnet caching guidance.

Scope the Debug "Verify package contents" check to the *.filelist outputs
it actually generates. A project's packages.lock.json is keyed only by
(framework, RID), with no host-OS axis, so a lock produced on Linux
legitimately differs from one produced on Windows whenever an OS-conditional
PackageReference applies (Debug+Windows pulls Microsoft.DiaSymReader*). The
Windows restore then rewrites those locks; that churn must not fail a step
whose job is to police the VSIX/MSI file lists.

Also drop the dead ILSpy.BamlDecompiler publish line from
publishlocaldev.ps1, mirroring the earlier publish.ps1 fix.

Assisted-by: Claude:claude-opus-4-8:Claude Code
2026-06-09 00:58:19 +02:00
Siegfried Pammer 7effa3084f Fix the Windows publish bundles for the Avalonia project layout
publish.ps1 is a WPF-era script that was never updated for the current
tree, and the "Publish x64/arm64" CI step aborted on two stale things:

- It published ./ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj, which
  does not exist here (the BAML library is ICSharpCode.BamlDecompiler and
  already ships transitively via the ILSpy dependency graph) -> MSB1009.

- It publishes the ReadyToRun plugin RID-specifically without restoring
  again, but the plugin declared no RuntimeIdentifiers, so the RID-less
  solution restore produced no win-x64/win-arm64 assets -> NETSDK1047.

Drop the dead BamlDecompiler lines and give the plugin RuntimeIdentifiers
mirroring ILSpy.csproj, so it restores and publishes for every platform
the host supports (the plugin is pure managed and RID-agnostic).

Assisted-by: Claude:claude-opus-4-8:Claude Code
2026-06-09 00:58:19 +02:00
Siegfried Pammer 6dbd8429b7 Port ILSpy.ReadyToRun plugin
R2R was the only legacy plugin still keeping the solution-level build red
(27 errors against the Avalonia tree). Port mirrors the four-corner
substitution used for the rest of the rewrite:

Assisted-by: Claude:claude-opus-4-7:Claude Code
2026-06-08 18:34:54 +02:00
Siegfried PammerandClaude Opus 4.7 317e33b3b8 Fix five small analyzer warnings.
* ExtensionDeclaration.SymbolKind (CA1065) — was throwing
  NotImplementedException; return SymbolKind.TypeDefinition to match
  TypeDeclaration / DelegateDeclaration, since `extension` declarations
  are type-level.
* CustomAttribute.DecodeValue (CA2002) — replace `lock(this)` on the
  sealed-but-internal class with a private syncRoot field.
* PlainTextOutput (CA1001) — implement IDisposable; track an
  ownsWriter flag so we only dispose the underlying TextWriter when
  the parameterless constructor created its own StringWriter.
* DotNetCorePathFinder (CA1060) — move the libc realpath / free
  PInvokes into a private nested NativeMethods class.
* ILSpy.ReadyToRun (CA1016) — add [assembly: AssemblyVersion("1.0.0.0")]
  in Properties/AssemblyInfo.cs to match the BamlDecompiler plugin.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
2026-05-08 21:22:48 +02:00
Christoph Wille 120154e21c Remove Translations (#3648) 2025-12-29 13:56:29 +01:00
tom-englert 1cfc5e740b Do not use ObservableObject when ObservableObjectBase is sufficient. (#3644)
* Do not use ObservableObject when ObservableObjectBase is sufficient.
2025-12-25 12:30:43 +01:00
Peter Crabtree e1e16b64f5 dev: Strip BOM mark from text files 2025-08-28 20:56:19 -04:00
Siegfried Pammer b6dc9fcfa9 Move more of the settings infrastructure to ILSpyX for reuse. 2025-07-06 17:39:06 +02:00
Andrew Au e3e4d576a6 Support disassembling single file bundle for ILSpy 2025-07-04 19:45:18 +02:00
Siegfried Pammer e4ebe20602 Upgrade dotnet target framework to net10 2025-07-04 19:08:07 +02:00
Andrew Au 6293cd1762 Update ReadyToRun to use 9.0 package (#3340) 2024-12-09 15:09:27 +01:00
tom-englert 560d89a42f Get rid of singletons, replace with DI: MainWindow, Settings and Language service 2024-10-26 10:48:27 +02:00
tom-englert 0be506bd4e Get rid of the heavy System.ComponentModel.Composition, replace with the lightweight System.Composition.AttributedModel 2024-10-22 05:41:52 +02:00
tom-englert 47d52fcacf Move active code from LanguageSettings to LanguageService, to make LanguageSettings independent of other services injected via DI 2024-10-19 16:43:14 +02:00
tom-englert da0117680b Fix some minor design flaws in new code. 2024-09-14 15:03:54 +02:00
tom-englert 2454cd3a99 Consolidate all options/settings to use a consistent WFP MVVM pattern. 2024-09-14 14:29:31 +02:00
tom-englert 8fe9514dfe refactor DecompilerSettings to MVVM model first design 2024-09-14 14:29:31 +02:00
tom-englert ca687e2394 Refactor OptionsDialog to use MVVM style 2024-09-14 14:29:30 +02:00
tom-englert 39b036b027 Remove more code from MainWindow, refactor startup sequence 2024-09-14 14:29:30 +02:00
tom-englert 74f4758d89 Move more settings-related items from MainWindow to SettingsService 2024-08-25 09:46:59 +02:00
tom-englert 610b0c2ed5 Annotate service lifetime explicitly. 2024-08-19 15:06:13 +02:00
Christoph Wille d1c7a51a1d Remove dangling project references for SharpTreeView (#3245) 2024-07-29 18:24:42 +02:00
Siegfried Pammer ca78d4a14d Use MetadataFile instead of PEFile in TypeSystem. 2024-03-24 15:35:13 +01:00
Christoph Wille 084d02a447 Apply Central package management (requires package source mapping) (#3124)
* Apply Central package management https://learn.microsoft.com/en-us/nuget/consume-packages/central-package-management (requires package source mapping https://learn.microsoft.com/en-us/nuget/consume-packages/package-source-mapping)

* Microsoft.DiaSymReader.Converter.Xml from dotnet-tools, Microsoft.DiaSymReader.Native from nuget.org feed

* Trying to sort what is on which feed for previews of Diasymreader packages

* Parse the Roslyn version from Directory.packages.props

* Use specific versions for Diasymreader from nuget.org to allow VS2022 addin to restore properly

* Tests needs also locked references
2023-11-23 07:25:23 +01:00
Siegfried PammerandChristoph Wille a94d66561a Move to .NET 8.0 (#3119)
* Basics of net8.0. Breaking unit tests expected.

* Missed that TestRunner project was already upgraded to net7.0 (search and replace fail)

* Use Preview 6 locally

* Use .NET 8.0 RTM

* Final fixups

---------

Co-authored-by: Christoph Wille <[email protected]>
2023-11-17 20:23:38 +01:00
Andrew Au f4af00a8f9 Update ready to run 2023-09-22 21:31:50 -07:00
unknown 2b8bf8143d Show alternative message if no GC Info is found 2023-09-05 17:28:01 -07:00
Andrew Au 290be277c6 Chinese translation 2023-09-05 15:50:21 -07:00
unknown c39a1f7fcc Add Show GC Info checkbox 2023-09-05 13:43:01 -07:00
unknown 232582b81d Stop iterating through all of runtimeFunction.DebugInfo.BoundsList for each instruction 2023-09-01 17:07:40 -07:00
unknown 99a1e427ea Adding GC transitions 2023-09-01 16:08:39 -07:00
unknown 20201d3598 Add GC Info 2023-09-01 15:15:44 -07:00
Andrew Au 7af3988ed7 Refresh ready to run package 2023-05-10 10:01:40 -07:00
Andrew Au cc87b00109 Support disassembling ReadyToRun binaries compiled using composite mode 2023-04-02 18:09:05 -07:00
Christoph Wille c62072c987 Update NuGets for R2R plugin 2023-03-25 12:13:39 +01:00
Christoph Wille 003a2b45b4 Move Settings to ILSpyX (#2869)
* Move ILSpySettings to ILSpyX
* Make settings file path configurable using a static provider interface
* Move MiscSettings to ILSpyX, rename existing to MiscSettingsVieModel
* Introduce static Load for DecompilerSettings on interface
* Add path provider for ilspycmd parameter scenario
* Allow for saving of MiscSettingsPanel
* Rename DisplaySettings to DisplaySettingsViewModel
* Add SaveDecompilerSettings
2022-12-19 07:40:06 +01:00
Siegfried Pammer 92e9b28e4d - Remove static state from DisplaySettingsPanel
- Remove static state from DecompilerSettingsPanel
- Remove shortcut ctors from DecompilationOptions
2022-09-11 00:40:00 +02:00