Skip to content

Wrong app sdk version number reported if another application directory with an older app sdk is added to PATH #5944

@lhak

Description

@lhak

Describe the bug

The Microsoft.Windows.ApplicationModel.WindowsAppRuntime.ReleaseInfo api reports the wrong version number in the following scenario:

  • The app is unpackaged and not self-contained
  • Another application (example: powertoys) is installed and its installation directory is added to the PATH variable and it contains a copy of the app sdk

In this case Microsoft.WindowsAppRuntime.Insights.Resource.dll is loaded from the directory of the other installed application and the wrong version number is reported.

Steps to reproduce the bug

  1. Install powertoys
  2. Create an unpackaged (not self-contained) app sdk application
  3. Check the return value of Microsoft.Windows.ApplicationModel.WindowsAppRuntime.ReleaseInfo

Expected behavior

The app sdk version number should not be influenced by installing another (unrelated) application.

Screenshots

No response

NuGet package version

Windows App SDK 1.8.2: 1.8.251003001

Packaging type

Unpackaged

Windows version

Windows 11 version 24H2 (26100, June 2025 Update)

IDE

Visual Studio 2022

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions