How do i debug Windows.ApplicationModel.Package.Current object in WPF

Jignesh Desai 106 Reputation points
2021-03-31T16:33:37.967+00:00

Hi,

I have a WPF application and i want to read contents of Windows.ApplicationModel.Package.Current object.

So during debug is there a way to emulate that package is installed , so that i debug ?

Regards

Universal Windows Platform (UWP)
{count} vote

1 answer

Sort by: Most helpful
  1. Nico Zhu (Shanghai Wicresoft Co,.Ltd.) 12,866 Reputation points
    2021-04-02T01:36:27.103+00:00

    Hello, Welcome to Micorosoft Q&A,

    I have a WPF application and i want to read contents of Windows.ApplicationModel.Package.Current object.

    Derive from document here,

    Although Package is supported in desktop apps, this member is supported only in UWP apps. To access a package object from a desktop app, use Windows.Management.Deployment.PackageManager.

    If you used WPF app, please use Windows.Management.Deployment.PackageManager to access the app's Package property.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.