I have a NetCore3.1 WPF Application (Windows 10, VS2019). I can pack it as MSIX app (using official documentation).
In the .appxmanifest
file I added:
<Capabilities>
<Capability Name="internetClient" />
<rescap:Capability Name="runFullTrust" />
<rescap:Capability Name="packageQuery" />
</Capabilities>
I can install and use my application without problems. The problem is that I try to use the Windows.Management API in my application like so:
var pkgManager = new Windows.Management.Deployment.PackageManager();
IEnumerable<Windows.ApplicationModel.Package> packages = pkgManager.FindPackagesForUser("");
I dont get any exceptions when using this but the packages
variable value is System.__ComObject
.
I dont understand what exactly is that and why am I not getting the desired result - a list of all installed msix packages for the user.