spurgeon
spurgeon

Reputation: 1112

Visual Studio: Add UWP Windows.ApplicationModel.Store to non-UWP Project

Is it possible to add Windows Store in-app purchase capability to a non-Universal Windows Platform (UWP) .NET project (class library .dll project) in Visual Studio 2017?

Background: I have an Inno Setup installer for a Delphi project that converts with Microsoft's Desktop App Converter (from the Desktop Bridge project). I would like to enable in-app purchase capability by adding the Windows.ApplicationModel.Store namespace and purchase logic to a .NET assembly created as a RemObjects Hydra plugin. By doing this, my Delphi app can perform in-app purchases using the Hydra plugin.

If there's a better solution for implementing Windows Store in-app purchases with a Classic Windows App (CWA) that has been converted with the Desktop App Converter, I'm all ears.

Upvotes: 1

Views: 803

Answers (1)

Zhendong Wu - MSFT
Zhendong Wu - MSFT

Reputation: 1829

Is it possible to add Windows Store in-app purchase capability to a non-Universal Windows Platform (UWP) .NET project (class library .dll project) in Visual Studio 2017?

Yes. However, according to the document of Windows.ApplicationModel.Store:

The Windows.ApplicationModel.Store namespace is not supported in Windows desktop applications that use the Desktop Bridge. These applications must use the Windows.Services.Store namespace to implement in-app purchases and trials.

Besides, the Windows.Services.Store namespace is also designed to have better performance.

By the way, for Desktop Bridge app, you might need to add additional code when you use StoreContext class to implement in-app purchase in your project. If your app has a window handle associated with rendering framework, you need to specify which application windows is the owner windows for modal dialogs shown by the object.

For the details of steps, you can refer to Using the StoreContext class with Desktop Bridge.

Upvotes: 1

Related Questions