❔ Add app to share menu
is it possible to add your c# app to the windows 10 share menu that opens from selecting a file and pressing share in the right click menu?
this window:
34 Replies
you can add it to "Start Menu" folder
C/program data/Microsoft/Windows/Start Menu
oh it was share menu
mb
you probably cannot, they have to be verified
Yes it is possible. But their is no good documentation how to do it. I have done it a few weeks ago and it somehow works. But I also needed Explorer context menu integration ....
What I can tell in short is you have to create a App package for your application (MSIX) that has do be installed. The app package tells Windows the extensions your app supports (ex. uap:Extension Category="windows.shareTarget" that your app supports sharing).
I can tell you more later if you wish.
Oh, my app is wpf...
My main app is also a WPF app. Is it a professional app or some app for private use. Are you writing the app from scratch or is it already in use? How is it currently deployed to PCs?
Are you using Visual Studio for development?
The simplest solution is to deploy your app as a app package (MSIX) (project template in Visual Studio) and define the windows.shareTarget extension in the package manifest file.
It's just a personal project that I'm making for fun
Yes
I'm not on my computer right now, because I'm eating breakfast right now, so I can look into it more later when I get on the computer
I found this article how to create a app package for a desktop app: https://learn.microsoft.com/en-us/windows/msix/package/packaging-uwp-apps
And for sharing you have to add a declaration for "Share Target".
Happy coding!
Packaging MSIX apps - MSIX
To distribute or sell your Windows app, you need to create an app package for it.
i think this only works for uwp apps, there isnt an appxmanifest file in my wpf app
You have to add a new project with the "Windows Application Packaging Project". From that you add a project reference to your existing WPF app.
Maybe this is a better article: https://learn.microsoft.com/en-us/windows/apps/desktop/modernize/modernize-wpf-tutorial-5
Package and deploy with MSIX - Windows apps
This tutorial demonstrates how to package and deploy the app using MSIX.
thx for all the help, ill set this up tomorrow, because its like 12:30 am for me rn
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.i havent tried it yet, i wasnt on my computer today
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.didnt code again today, ill try it tomorrow
im getting this error when trying to run the package project from following this tutorial...
Please check in Visual Studio Installer if you have checked "MSIX Packaging Tools".
ok, ill check this tomorrow, because its late for me rn again..
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.im gonna test it rn
i was actually just about to check it when it said that..
still a little error that im gonna try to fix myself tomorrow before asking about it here. im pretty sure its an easy fix, but im just too tired to try to fix it tonight
i got it to build it now, but now the visual studio ide literally crashes when i run the package project...
i see these errors in the windows event viewer when it crashes.
Check following solution: https://stackoverflow.com/questions/75120980/vs2022-net-maui-blazor-start-with-without-debugging-causes-devenv-exe-to-cra
Stack Overflow
VS2022 + Net Maui Blazor - Start with/without debugging causes deve...
Running a Net Maui blazor hybrid app in Net core 7 causes VS 2022 to close without error
After reviewing event viewer there are 2 errors when the crash occurs
.Net runtime
Application: devenv.exe
still happened after doing that.. ill just try to fix it tomorrow, its almost 1 am for me rn
our timezones are so opposite.. you literally just come online when im about to get off the computer...
i did also notice that Microsoft.Windows.SDK.BuildTools in the packaging project dependencies and my wpf project in the packaging project applications node both have a warning symbol on the solution explorer too, but it doesnt say what the warnings are in the error list...
Run "Rebuild" on the package and check the output window.
ok, it rebuilt
they arent errors, they were just warnings, so the project still builds fine
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.no
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.no
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.no
im working on other parts of my app for now and ill try to figure out the packaging later
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.i guess ill just let it be marked as stale and type here again when i work on this again
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.