45 Commits
Author SHA1 Message Date
Siegfried Pammer cd10506c96 Fix #4079: make stable Roslyn restorable from the solution directory
ICSharpCode.Decompiler.Generators pins a stable Microsoft.CodeAnalysis.CSharp
(a source generator must not reference a Roslyn newer than the host compiler)
and ILSpy.AddIn.VS2022 pins a stable 4.0.1. Stable Roslyn lives only on
nuget.org, but the repo-root NuGet.config mapped Microsoft.CodeAnalysis.*
exclusively to the dotnet-tools feed, which carries only prerelease builds.
Both projects worked around that with a per-project NuGet.config. dotnet
restore honors it, since settings are computed per project directory, but
Visual Studio starts NuGet.config discovery at the solution directory and
never sees it: the first restore in VS on a machine with a cold NuGet cache
fails with NU1103 exactly as reported. Once any successful restore has put
the stable package into the global packages folder, source mapping is
satisfied from the cache and the problem never reappears on that machine,
which is why #3835 was closed as unreproducible.

NuGet consults every source that declares the longest pattern matching a
package id, so mapping Microsoft.CodeAnalysis.* to nuget.org as well as to
dotnet-tools makes both feeds available for the whole family: the stable
versions resolve from nuget.org and the prerelease $(RoslynVersion) from
dotnet-tools. Both per-project configs are then redundant and removed.

Verified with an empty NUGET_PACKAGES and the root config forced as the only
config (simulating VS's discovery): the old config reproduces the reported
NU1103; with the new config the generator, the decompiler tests (prerelease
Roslyn) and the VS add-in (stable 4.0.1 with its Workspaces dependencies)
all restore; restore.ps1 over ILSpy.sln leaves the lock files unchanged.

Assisted-by: Claude:claude-fable-5:Claude Code
2026-08-30 10:37:35 +02:00
Siegfried Pammer ffb39611b8 Reimplement cross-platform single-instance handling
The Avalonia port dropped ILSpy's single-instance feature, leaving three
inert surfaces behind: the --newinstance / --noactivate switches, and the
"Allow multiple instances" option were parsed and persisted but never read,
and every launch started a new process.

The former WPF implementation also encoded the executable location in the
mutex name, so two ILSpy builds at different paths never shared an instance.
That broke the Windows "Open with ILSpy" shell command: it launches a fixed
executable and would not reuse a running instance started from elsewhere.

Reimplement it with portable primitives (named Mutex + named pipes, no
P/Invoke): the first launch for a user takes the mutex and listens; a later
launch forwards its arguments over the pipe and exits. The namespace is
derived from machine + user only -- never the location -- so any launcher
reuses the running instance. --instanceid is a runtime reuse filter matched
against the running instance's actual executable identity (via
Environment.ProcessPath, single-file-bundle safe), not part of the mutex
name, so it never re-introduces the location partitioning it replaces. The
VS add-in passes its bundled exe path as --instanceid to prefer its own
build while still sharing with a plain launch of that same executable.

Assisted-by: Claude:claude-opus-4-8:Claude Code
2026-07-23 17:02:32 +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
Christoph Wille aab6303870 Migrate the VS extension to an SDK-style VSIX (dotnet build) and retire the VS2017/2019 add-in (#3808)
* Migrate ILSpy.AddIn.VS2022 to SDK-style VSIX project
* Retire the legacy VS2017/2019 ILSpy add-in
* Build the VS extension via dotnet build on the slnx
* Inline ILSpy.AddIn.Shared into ILSpy.AddIn.VS2022
* Restore the VS add-in menus broken by the SDK-style migration
2026-06-24 06:09:29 +02:00
Siegfried Pammer bdf7e35e14 Drop the stale net10.0-windows segment from publish-output paths
ILSpy targets net10.0, not net10.0-windows; the VS add-in build paths, the
installer output dir, the local-dev publish script, and the VS Code launch
config still referenced the old net10.0-windows layout. Align them with the
actual TFM, matching publish.ps1 and the build workflow.

Assisted-by: Claude:claude-opus-4-8:Claude Code
2026-06-10 00:47:06 +02:00
Siegfried Pammer 40a667fefb Treat warnings as errors repo-wide
A clean build currently has zero warnings; enforce that so new ones can't
accumulate unnoticed. Set TreatWarningsAsErrors in the root
Directory.Build.props rather than per project. ICSharpCode.ILSpyCmd keeps
its existing TreatWarningsAsErrors=false (project-level wins over the
imported default), and the three legacy net472 projects (the VS add-ins
and the installer builder) opt out explicitly since they only build on
Windows and aren't covered by the cross-platform CI that gates this.

Assisted-by: Claude:claude-opus-4-8:Claude Code
2026-06-10 00:11:56 +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
Christoph Wille 6f1c2b6cc9 .NET 11 for Tests (#3695)
* .NET 11 RC2 minimal changes
* Heuristic for transport feed Roslyn selection
* Microsoft.CodeAnalysis.NetAnalyzers from main NuGet feed
* Use the VS2026 image
* Switch all test projects to net11
* Extract constants
* Include vsix with plain nuget.config files
2026-04-11 12:57:53 +02:00
Christoph Wille b5fc0d5b06 Use releaseTag with fallback to downloadUrl in updates.xml (#3713)
* Use releaseTag with fallback to downloadUrl in updates.xml
* Add tests
* Prevent arbitrary downloadUrl - must start with BaseUrl as well
* Remove custom domain ilspy.net in end-user visible places
2026-04-11 12:55:39 +02:00
Christoph Wille 120154e21c Remove Translations (#3648) 2025-12-29 13:56:29 +01:00
Peter Crabtree e1e16b64f5 dev: Strip BOM mark from text files 2025-08-28 20:56:19 -04:00
Siegfried Pammer e4ebe20602 Upgrade dotnet target framework to net10 2025-07-04 19:08:07 +02:00
Christoph Wille a0e22b1757 IncludeInVSIX passes original name unchanged (ignores Linked) 2025-01-03 10:53:31 +01:00
Christoph Wille 4bad0c7a4b Move license.txt to root folder LICENSE file 2025-01-03 10:12:45 +01:00
Christoph Wille 60251044cd Adapt ILSpyInstance:Start to new command line options 2024-05-04 11:21:07 +02: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
Christoph Wille a6a86a6165 Microsoft.VSSDK.BuildTools 17.6.2164 for both projects 2023-06-15 10:19:54 +02:00
Christoph Wille fb2f98061c Update Microsoft.VSSDK.BuildTools 2023-06-14 14:00:34 +02:00
Christoph Wille 636219d539 Enable arm64 installation 2023-06-14 13:18:11 +02:00
Christoph Wille d43a5c94e7 Adapt GetILSpyPath and copy both x64 and arm64 ILSpy into the VSIX for VS 2022 2023-06-14 12:26:33 +02:00
Christoph Wille 040ac1ac81 Switch from default output directory to publish folder 2023-06-14 12:16:21 +02:00
Christoph Wille 9cc35cdca2 Move VS Extensions projects to a separate solution 2023-06-14 12:12:15 +02:00
Christoph Wille ace11158a2 Use latest VS SDK (#2767)
* Update https://www.nuget.org/packages/Microsoft.VSSDK.BuildTools to 17.3.2093 to match https://github.com/actions/runner-images/blob/main/images/win/Windows2022-Readme.md (VS Build # to version: https://docs.microsoft.com/ro-ro/visualstudio/install/visual-studio-build-numbers-and-release-dates?preserve-view=true&view=vs-2022)

* Upgrade downlevel (<=2019) addin too to 17.3.2093
2022-08-24 07:55:26 +02:00
Siegfried Pammer 504d16e44d Use ReferenceAssemblyAnnotator in ILSpy.AddIn.csproj and ILSpy.AddIn.VS2022.csproj 2022-04-10 23:25:55 +02:00
Siegfried Pammer a2b1e9a6ca Use VSIXSourceItem to add ILSpy distribution to VSIX after ResolveProjectReferences. 2022-04-04 15:41:40 +02:00
Siegfried Pammer c7719b1a6f Try again to remove ILSpy.dll.config. 2022-04-03 16:52:51 +02:00
Siegfried Pammer d5f8145a10 Convert solution-level dependencies to project-level dependencies.
Solution-level dependencies are incompatible with slnf.
2022-04-03 15:45:57 +02:00
Christoph Wille 04b75be5d2 Go back to Microsoft.VSSDK.BuildTools 17.1.4054 2022-03-31 09:05:20 +02:00
Siegfried Pammer fa451b5b87 Update nuget packages and references for VS2022. 2022-03-30 03:45:44 +02:00
Siegfried Pammer 4519c3b5c1 Remove leftovers of AppVeyor-specific configuration. 2022-03-30 03:45:43 +02:00
Siegfried Pammer bf3b93ec76 Fix #2644: Ignore warnings MSB3277 and VSSDK1009 2022-03-30 03:45:43 +02:00
Siegfried Pammer 1ccc63b829 Revert removal of app.config.template 2022-03-13 14:53:07 +01:00
SilverFox 2ce3419019 Fix build for VSAddIn 2022-03-11 12:22:08 +01:00
Christoph Wille 9e1c2ab7c9 Remove <Preview> from VS 2022 addin manifest 2022-03-07 17:03:06 +01:00
Christoph Wille 379cc763c0 Fix ILSpyBuildPath and .exe.config -> .dll.config. Note: should use output from dotnet publish! 2022-02-07 08:55:04 +01:00
Siegfried Pammer 9e54b44b11 Move ILSpy to net6.0-windows 2022-02-06 17:34:30 +01:00
Christoph Wille e82dd73872 Update Microsoft.VisualStudio.SDK for 2022 extension - dependent NuGet Microsoft.VisualStudio.Setup.Configuration.Interop now available 2021-11-09 08:11:26 +01:00
Christoph Wille 582002888b Revert "Final Microsoft.VisualStudio.SDK for 2022 extension"
This reverts commit 0625f815b0.
2021-11-08 21:10:00 +01:00
Christoph Wille 0625f815b0 Final Microsoft.VisualStudio.SDK for 2022 extension 2021-11-08 20:48:03 +01:00
Christoph Wille 5916980f48 Publisher Name fix, add tags & preview info 2021-10-24 10:44:31 +02:00
Andreas Weizel 11c107e32f Try the opposite way: Use only project instead of build dependencies 2021-10-24 00:23:34 +02:00
Andreas Weizel 4f378f7790 Remove project reference on ILSpy from AddIns, use build dependencies instead 2021-10-23 23:32:04 +02:00
Andreas Weizel f22343b482 Change display name of VS 2022 AddIn 2021-10-23 22:21:44 +02:00
Andreas Weizel 075c447954 Rename ILSpy.AddIn.VS17 to ILSpy.AddIn.VS2022 2021-10-23 14:13:45 +02:00