Skip to content

fix(software-apps): fix installed runtime and redistributable detection - #724

Open
hamsa0x7 wants to merge 1 commit into
memstechtips:mainfrom
hamsa0x7:fix-runtime-detection
Open

fix(software-apps): fix installed runtime and redistributable detection#724
hamsa0x7 wants to merge 1 commit into
memstechtips:mainfrom
hamsa0x7:fix-runtime-detection

Conversation

@hamsa0x7

@hamsa0x7 hamsa0x7 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Enhances the registry display name pattern matching to support multiple pipe-separated (|) patterns, and updates definitions for .NET Runtime 3.1 and Visual C++ 2015-2022 to prevent them from being incorrectly reported as missing.

Problem

Under AppStatusDiscoveryService.cs, when checking if an app is installed, the service verifies the installation status against a single registry pattern to prevent false positives.
However, two specific runtimes had incorrect/outdated patterns:

  1. .NET Runtime 3.1 registers in the registry as Microsoft .NET Core Runtime - 3.1... (containing the word Core), whereas the definition expected Microsoft .NET Runtime - 3.1....
  2. Visual C++ 2015-2022 registers in newer releases as Microsoft Visual C++ v14 Redistributable... instead of Microsoft Visual C++ 2015-2022 Redistributable....

These mismatches caused Winhance to mistakenly reject the WinGet check as a false positive, marking the runtimes as missing even when they were successfully installed.

Changes

  • src/Winhance.Infrastructure/Features/SoftwareApps/Services/AppStatusDiscoveryService.cs: Updated MatchesPattern to split patterns by | to allow OR matching against multiple patterns.
  • src/Winhance.Core/Features/SoftwareApps/Models/ExternalAppDefinitions.RuntimesAndDependencies.cs: Added the alternative registry display names for .NET Runtime 3.1 and Visual C++ 2015-2022.
  • tests/Winhance.Infrastructure.Tests/Services/AppStatusDiscoveryServiceTests.cs: Added unit tests to cover pipe-separated pattern matching, .NET Core Runtime names, and Visual C++ v14 names.

Related Issues

Fixes #705

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Installed .NET Runtimes and Visual C++ Redistributables incorrectly detected as missing

1 participant