Forum Discussion
Martin82
Dec 23, 2021Copper Contributor
UpdatePackageAsync fails with FileNotFoundException
Hi everyone,
I'm trying to update an MSIX installed .netcore3.1 application using the Windows.Management.Deployment.PackageManager), with the following source code:
var installTask = packagemanager.UpdatePackageAsync(new Uri(downloadUri),null, DeploymentOptions.ForceApplicationShutdown | DeploymentOptions.ForceUpdateFromAnyVersion ).AsTask(downloadProgress);
The operation immediately the new package) fails with a FileNotFoundException and the Error Code 0x8007002 . (System.IO.FileNotFoundException: The system cannot find the file specified. (0x80070002)) The Filename Property of the Exception is unfortunately empty.
The new downloadUri is reachable from browser without authentication.
Is there a way to debug the UpdatePackage Operation or gather more Details? I tried Get-AppXLog, but it didn't contain any entries for the relevant time period.
Thanks!
Martin
- MikeHBrass ContributorIdeas:
1. Do you see any attempt to contact the server in your server logs at all?
2. Does the URI contain any weird characters or other things that could be confusing it?
3. Does the URI point to an .appinstaller file (might be broken at the moment by the ms-appinstaller:// screwups) or an MSIX file? Try both?- Martin82Copper ContributorThank you for your ideas!
1) No, I don't see any requests in the log. I also tried fiddler to trace outgoing traffic, but also didn't see any requests or request attempts.
2) No, Just . _ / [a-z] and [0-9] but I'll try even simpler Uris ones after the holidays.
3) its a direct https:// url to a MSIX File, without the appinstaller.