Fix race condition in PEInterface build and improve icon loading#4810
Merged
Gabriel Dufresne (GabrielDuf) merged 2 commits intoMay 21, 2026
Merged
Conversation
Conditional ItemGroups on $(TargetFramework) hid manager ProjectReferences from the outer multi-target evaluation (where $(TargetFramework) is empty), so parallel IDE schedulers (Rider, VS) could start PEInterface's inner builds before Chocolatey/PowerShell/Scoop/WinGet (or Apt/Dnf/Pacman/etc.) finished, producing CS0006 "metadata file ... could not be found" errors. Declare every manager ProjectReference unconditionally so the project graph is correct. Use ReferenceOutputAssembly metadata to scope which TFM actually consumes which assembly, and SetTargetFramework to pin Windows-only managers (single-TFM) when consumed from the net10.0 inner build. The set of /reference assemblies passed to csc and the bin/ output per TFM are unchanged.
The icon cache (IconCacheEngine.MimeToExtension) writes files in formats
Avalonia's Skia Bitmap cannot decode: SVG, AVIF, ICO, TIFF. Passing such
a file to `new Bitmap(uri.LocalPath)` throws
ArgumentException("Unable to load bitmap from provided data"). The
exception is caught and the failure is cached, but Rider's debugger
surfaces every first-chance throw, so users see a flood of stack traces
whenever the package list brings new rows with non-raster icons into
view (e.g. after typing in the search bar).
Whitelist PNG/JPEG/GIF/BMP/WebP — the formats Skia can actually decode —
and short-circuit unsupported extensions to a cached-null result. The
package falls back to its manager source icon, same as before.
Marc-André Moreau (mamoreau-devolutions)
approved these changes
May 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two unrelated-but-small fixes to the Avalonia build & UI that surfaced during day-to-day work on UniGetUI.Avalonia.slnx:
Building UniGetUI.Avalonia.slnx from a clean state in Rider (and presumably VS)intermittently fails with errors like:
CSC: Error CS0006 : Metadata file '…\UniGetUI.PackageEngine.Managers.Chocolatey\obj\x64\Debug\net10.0-windows10.0.26100.0\ref\UniGetUI.PackageEngine.Managers.Chocolatey.dll' could not be foundTyping in the package search bar produced a flood of caught-but-logged exceptions in Rider:
System.ArgumentException: Unable to load bitmap from provided data at Avalonia.Skia.ImmutableBitmap..ctor(Stream stream)