You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Where is the PackageVolume.GetPackageVolumesAsync()? #6257
Where is the PackageVolume.GetPackageVolumesAsync() method? I found the PackageVolume.FindPackageVolumes method in the latest official Microsoft documentation, but it can only find package storage volumes that already have storage paths set on the device, and cannot find package storage volumes without set storage paths. On the other hand, the PackageManager.GetPackageVolumesAsync() method can get all storage volumes on the device (whether they are mounted or not). The results returned by these two methods are different, so they should be distinguished.
PackageVolume.GetPackageVolumesAsync() 方法在哪里?我在 Microsoft 的官方最新文档中找到了 PackageVolume.FindPackageVolumes 方法,但是它只能找到设备上已经设置存储路径的包存储卷,并不能找到未设置存储路径的包存储卷。而 PackageManager.GetPackageVolumesAsync() 方法却可以获取到设备上所有的存储卷(无论是否已经挂载)。这两个方法返回的结果是不同的,所以应该加以区分。
As shown in the figure below, my device has the C drive (system drive) set as the default storage volume for app packages, so calling the FindPackageVolumes method can only find the C drive. However, calling the GetPackageVolumesAsync method can retrieve all the drives on my device (C drive, D drive, E drive), even though no storage volumes have been added to the D drive or E drive. After calling these methods, the default displayed storage path is the root directory of the drive. (The picture shows the case where the D drive has no storage path set).
如下图所示,我的设备上默认设置了 C 盘(系统盘)为应用包的存储卷,所以调用 FindPackageVolumes 方法只能找到 C 盘,但是调用 GetPackageVolumesAsync 方法可以获取到我设备上所有的磁盘(C 盘,D 盘,E 盘),尽管 D 盘,E 盘并未添加任何存储卷,调用这些方法后,默认显示的存储路径是磁盘的根目录。(图片中显示的就是 D 盘未设置存储路径的情况)。
The Msix Hero app has already implemented the functionality of this module, so I also want to implement this module's functionality in my app.
Thanks for filing this issue! There’s a related issue that goes into more detail on the PackageVolume and PackageManager APIs (#6222). To help keep feedback and updates in one place, we’ll close this one as a duplicate.
Activity
lauren-ciha commentedon Feb 26, 2026
Thanks for filing this issue! There’s a related issue that goes into more detail on the
PackageVolumeandPackageManagerAPIs (#6222). To help keep feedback and updates in one place, we’ll close this one as a duplicate.