question

JigneshDesai-5309 avatar image
1 Vote"
JigneshDesai-5309 asked NicoZhu-MSFT edited

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

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

windows-uwp
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Do you use pure WPF app or desktop bridge app?

1 Vote 1 ·

Hi,

Its a WPF app, but used to publish into store using desktop bridge (Application Packaging Project).

Regards

1 Vote 1 ·

Are you trying to attach a Visual Studio debugger to a running WPF application so you can read the properties of the installed application that are not available to you when you are running and debugging your WPF application directly from inside Visual Studio?

0 Votes 0 ·

Hi Richard,

Yes, you are right.

Regards

1 Vote 1 ·

1 Answer

NicoZhu-MSFT avatar image
0 Votes"
NicoZhu-MSFT answered NicoZhu-MSFT edited

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.


· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,

Meanwhile I found this and I am using Windows.ApplicationModel.Package.Current and it appears to give me right package name and version.

What is difference between Windows.ApplicationModel.Package.Current & Windows.Management.Deployment.PackageManager ??

Regards

1 Vote 1 ·

This document could explain this, please refer this.


1 Vote 1 ·

Hi,

Thanks NicoZhu-MSFT, Is there a way to get ApplicationId/ProductID from Windows.ApplicationModel.Package.Current object or any other object ?

I wish to use it to invoke store review using : ms-windows-store://review/?ProductId={0}

Regards

1 Vote 1 ·
Show more comments