I've built a UWP app which I would like offer as a trial in the Microsoft Store. I've added the calls to the Store API to check for the trial state and time remaining on the trial per this documentation: https://docs.microsoft.com/en-us/windows/uwp/monetize/implement-a-trial-version-of-your-app
Now I'm following these instructions to test my code: https://docs.microsoft.com/en-us/windows/uwp/monetize/in-app-purchases-and-trials#testing
Per the testing instructions, I've published the app to the Store and downloaded it to my local machine. The store tells me that I have xx number of days left on my trial. I launch the app once and close it. Then I open the project in Visual Studio and launch the app for debugging, I get this warning: I click "yes".
Then the deployment fails with this error:
DEP0700: Registration of the app failed. [0x80073CF9] Rejecting a request to register from AppxBundleManifest.xml because the manifest is not in the package root.
If I uninstall the trial app, then my project will deploy, but the app license that I get back in code says .IsTrial = false
, so I don't think this will allow me to actually test the app trial.
Any thoughts on how i can test this trial mode?
UPDATE: I want to clarify that I can debug the app I've downloaded from the Store by attaching to the process as answers have suggested, but that is not what I'm looking for, as it's not reasonable to resubmit to the Store every time need to make changes to the code.
The Microsoft documentation that I linked to (second link) specifically states that I should be able to run, debug and change code regarding the Store API via Visual Studio...
After you complete these steps, you can continue to update your app's code and then debug your updated project on your development computer without submitting new app packages to the Store.
My goal is to get this debugging solution working as documented.
This can be done by debugging an installed app. Essentially, you will have the trial version of your app, and debug it with visual studio and be able to debug your trial related functions.
Hope it helps.
So what you need are the PDB symbol files for your store version of the app... If you've submitted your app and it's already in the store you can download the PDB symbol files from the developer dashboard. Then you'll need to configure visual studio to locate the symbol file and attach your debugger to a deployed app.
If you built the app locally in release mode- you'll find your PDB symbol files in the build folders.
You don't deploy or run your app from visual studio! You run your app and attach visual studio to the process. You need to ensure your are generating and uploading PDB symbol files for your app... You'll see this check box in your "Create App Package" window.
Also you can use the directions in the link you have- use this"
"If your app uses the Windows.ApplicationModel.Store namespace, you can use the CurrentAppSimulator class in your app to simulate license info during testing before you submit your app to the Store. "
I finally got this to work. I suspected that there was something corrupt in the Windows install on my development machine that was causing this not to work as documented. So, I set up a fresh install of Windows 10 on a Hyper-V VM and used remote debugging tools. Every thing worked on that fresh install, as expected. Here's the steps I took:
I also faced this issue in my previous developing. Please try to open your visual studio in administrator mode. With this way, I can deploy it successfully.
The steps: Start -> right click 'visual studio' -> More -> Run as administrator.
User contributions licensed under CC BY-SA 3.0