How to debug context.GetAppAndOptionalStorePackageUpdatesAsync() method.
Hi
Original question asked was here, but i am being redirect to this forum.
Very basic thing I want to do is to check if there is new version of app available during debugging.
App was installed from the store long back and hence call to other store api works properly during debugging session.
Lets assume in the store current stable version is 2.1.2.0. Now in order to test below line of code during debugging, what i did was, manually changed package version number in Package.appxmanifest file to 1.1.0.0 before starting a debug session.
IReadOnlyList<StorePackageUpdate> updates = await context.GetAppAndOptionalStorePackageUpdatesAsync();
if (updates.Count > 0)
{
StorePackageUpdate update = updates[0]; // Assuming single main package
PackageVersion storePackageVersion = update.Package.Id.Version;
string storeVersion = $"{storePackageVersion.Major}.{storePackageVersion.Minor}.{storePackageVersion.Build}.{storePackageVersion.Revision}";
}
But to my surprise string storeVersion always return 1.1.0.0. The call to store API "GetAppAndOptionalStorePackageUpdatesAsync" should get data from Microsoft Store, but for some reason it does not. Is this a bug ?
Regards