Reputation: 1299
I've submitted my app to the Windows Store and it passed certification. As per the instructions for testing:
I've published the app as a Hidden app. I've also Associated the app to the Store:
When I debug my app, I neve get a proper StoreContext instance. I have the following error:
According to the documentation link above, this is the problem I have:
If you do not associate your project with an app in the Store, the StoreContext methods set the ExtendedError property of their return values to the error code value 0x803F6107. This value indicates that the Store doesn't have any knowledge about the app.
How do I get my app (or Visual Studio) get knowledge about my Store presence?
Upvotes: 4
Views: 1104
Reputation: 1299
I just figured it out. The steps have to be done exactly in this order:
If your app is not yet published and available in the Store, make sure your app meets the minimum Windows App Certification Kit requirements, submit your app in Partner Center, and make sure your app passes the certification process. You can configure your app so it is not discoverable in the Store while you test it. Please note the proper configuration of package flights. Incorrectly configured package flights may be not be able to be downloaded.
Next, make sure you have completed the following: Write code in your app that uses the StoreContext class and other related types in the Windows.Services.Store namespace to implement in-app purchases or trial functionality. If your app offers an add-on that customers can purchase, create an add-on submission for your app in Partner Center. If you want to exclude or limit some features in a trial version of your app, configure your app as a free trial in Partner Center.
With your project open in Visual Studio, click the Project menu, point to Store, and then click Associate App with the Store. Complete the instructions in the wizard to associate the app project with the app in your Partner Center account that you want to use for testing.
If you have not done so already, install the app from the Store that you specified in the previous step, run the app once, and then close this app. This ensures that a valid license for the app is installed to your development device.
In Visual Studio, start running or debugging your project. Your code should retrieve app and add-on data from the Store app that you associated with your local project. If you are prompted to reinstall the app, follow the instructions and then run or debug your project.
What I did was I reversed steps 3 and 4 👍 and it worked!
Upvotes: 7