Search code examples
windows-runtimeuwpwindows-store-appsdesktop-bridge

Get Store licensing-status in "Centennial" Winforms app


In a Winforms app converted into a uwp app (Centennial) - how can the app check for the licensing status?

In UWP I can use CurrentApp.LicenseInformation but that's under Windows.ApplicationModel.Store, and I can't find that in the Add Reference to Winforms.


Solution

  • To be able to use the WinRT APIs from your Winforms project, please add a reference to this WinMD reference: C:\Program Files (x86)\Windows Kits\10\UnionMetadata\Windows.winmd from your Winforms project. I'd also encourage you to take a look at the Desktop Bridge samples on GitHub: https://github.com/Microsoft/DesktopBridgeToUWP-Samples

    Btw, since you asked the Store licensing question, have you already filled up this form: https://developer.microsoft.com/en-us/windows/projects/campaigns/desktop-bridge yet? Once you fill up the form, someone from MSFT will contact you to work with you further regarding further help on the onboarding to the Store process...Let me know if you are stuck there...