-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SystrayExtension: System.InvalidOperationException: The process has no package identity #60
Comments
Hi Timo,
how did you execute? Launched from the app list entry, or via some other means?
Thanks,
Stefan
From: Timo Josten [mailto:[email protected]]
Sent: Tuesday, March 6, 2018 7:10 AM
To: Microsoft/DesktopBridgeToUWP-Samples <[email protected]>
Cc: Subscribed <[email protected]>
Subject: [Microsoft/DesktopBridgeToUWP-Samples] SystrayExtension: System.InvalidOperationException: The process has no package identity (#60)
Hi there,
the SystrayExtension-Sample does not seem to work. When deploying the solution and executing it, it successfully launches the WinForms tray icon application. However, when e.g. double clicking the tray icon to open the UWP application, it crashes with an exception:
System.InvalidOperationException: 'The process has no package identity. (Exception from HRESULT: 0x80073D54)'
Can you give me a hint on how to fix this? Haven't found anything useful yet.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FDesktopBridgeToUWP-Samples%2Fissues%2F60&data=04%7C01%7Cswick%40microsoft.com%7C8e64f3c090c04e07a01e08d583745ddd%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636559458179960718%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C-2&sdata=wEGD4xg8iQyKaL7UxmS02KHUq1WJwMUGG4QVIsNAyLE%3D&reserved=0>, or mute the thread<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FASRavKUY8bxa4fA7plzFDwbn5g8glWo6ks5tbqbUgaJpZM4Se36H&data=04%7C01%7Cswick%40microsoft.com%7C8e64f3c090c04e07a01e08d583745ddd%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636559458179960718%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C-2&sdata=Lk6b46i538oxaUViK6nTf22Nc5jOGTtADOF1OWRQhDc%3D&reserved=0>.
|
Hi there, thanks for the fast reply! I have deployed the app and am launching the Executable from the Release-folder. The same happens in my own application when launching the app via Visual Studio. |
Could you give me an example of how to do so? I'm sorry for asking but I am very new to Windows development, especially UWP. What would I need to do in order to run the Systray Example App (and use the double-click functionality on the Systray icon to open the UWP app)? Am I even able to deug both of the apps with Visual Studio simultaneously? Thanks very much! |
1. Install the app – either by deploying from VS, or you can also install it from the Store: https://www.microsoft.com/store/productId/9N27GQ9WGRHC
2. Click on Start to open the Windows start menu
3. In the app list scroll down to the letter “U” and find “UWP with Systray Extension”
4. Click on this app list entry
5. Now the app launches
6. Close the app and select “Close to Systray”
7. This will put the icon in the systray and everything should work as expected
Here is some additional information on this sample:
https://stefanwick.com/2017/06/24/uwp-app-with-systray-extension/
From: Timo Josten [mailto:[email protected]]
Sent: Tuesday, March 6, 2018 1:17 PM
To: Microsoft/DesktopBridgeToUWP-Samples <[email protected]>
Cc: Stefan Wick <[email protected]>; Comment <[email protected]>
Subject: Re: [Microsoft/DesktopBridgeToUWP-Samples] SystrayExtension: System.InvalidOperationException: The process has no package identity (#60)
Could you give me an example of how to do so? I'm sorry for asking but I am very new to Windows development, especially UWP. What would I need to do in order to run the Systray Example App (and use the double-click functionality on the Systray icon to open the UWP app)? Am I even able to deug both of the apps with Visual Studio simultaneously? Thanks very much!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FDesktopBridgeToUWP-Samples%2Fissues%2F60%23issuecomment-370931140&data=04%7C01%7Cswick%40microsoft.com%7C0ca9fb541365411e078f08d583a78dad%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636559678021295470%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C-2&sdata=pQKHmlJ%2FW4kd8aqW1PuoF7TvMEw4nykVUquoB1fcxWQ%3D&reserved=0>, or mute the thread<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FASRavGdJqfOwUGeui9v2bE0p-3ek5QlXks5tbvyzgaJpZM4Se36H&data=04%7C01%7Cswick%40microsoft.com%7C0ca9fb541365411e078f08d583a78dad%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636559678021295470%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C-2&sdata=0ZBOJZYFv0IFFy0heWx8KJJUtE9LHwieIEse%2BPRd5rU%3D&reserved=0>.
|
Hi Stefan, thanks very much, installing the app from the Store did indeed work. One final question for now: Is there any chance to see this use case in action when executing from Visual Studio, e.g. for debugging purposes? I understand that in order to get rid of the exception, the application must be deployed by VS or installed from the Store, which makes it hard to debug, right? Thanks again for your help. |
It works the same way from VS, just make sure you set the UWP project as your startup project, not the Winforms project. Now you can hit F5 to run and the debug the project in the right context.
If you want to debug the Winforms project, launch the UWP without debugging and attach to the Winforms process once it got launched.
Also note that now there is a better way to debug both parts of the solution simultaneously in VS, that wasn’t available at the time when I wrote the sample. Read all about that option at the below link. We should update the sample to use the new mechanism in VS, but didn’t get to it yet.
https://blogs.windows.com/buildingapps/2017/07/06/calling-winrt-components-win32-process-via-desktop-bridge/#V5B4Fsv5pDFUwohR.97
From: Timo Josten <[email protected]>
Sent: Wednesday, March 7, 2018 12:06 AM
To: Microsoft/DesktopBridgeToUWP-Samples <[email protected]>
Cc: Stefan Wick <[email protected]>; Comment <[email protected]>
Subject: Re: [Microsoft/DesktopBridgeToUWP-Samples] SystrayExtension: System.InvalidOperationException: The process has no package identity (#60)
Hi Stefan,
thanks very much, installing the app from the Store did indeed work. One final question for now: Is there any chance to see this use case in action when executing from Visual Studio, e.g. for debugging purposes? I understand that in order to get rid of the exception, the application must be deployed by VS or installed from the Store, which makes it hard to debug, right?
Thanks again for your help.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FDesktopBridgeToUWP-Samples%2Fissues%2F60%23issuecomment-371056556&data=04%7C01%7Cswick%40microsoft.com%7C026896be20054e32016308d584025317%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636560067877321860%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C-2&sdata=gNwxQbTPh3TzETsbSGogovxvYYS0dI0CVUrKXJtOJpg%3D&reserved=0>, or mute the thread<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FASRavAEi-Hb-z8x0eYWCSNFpz4fVxOgfks5tb5T-gaJpZM4Se36H&data=04%7C01%7Cswick%40microsoft.com%7C026896be20054e32016308d584025317%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636560067877321860%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C-2&sdata=F7nMVSpMRLLRyjXfO0N7qdPTb%2F7xKO%2B%2BfWEwvlIM6Jg%3D&reserved=0>.
|
Hi there,
the SystrayExtension-Sample does not seem to work. When deploying the solution and executing it, it successfully launches the WinForms tray icon application. However, when e.g. double clicking the tray icon to open the UWP application, it crashes with an exception:
System.InvalidOperationException: 'The process has no package identity. (Exception from HRESULT: 0x80073D54)'
Can you give me a hint on how to fix this? Haven't found anything useful yet.
The text was updated successfully, but these errors were encountered: