❔ 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
MasterSubarashii
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
rifftheraff
rifftheraff2y ago
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.
jacobh12349
jacobh123492y ago
Oh, my app is wpf...
rifftheraff
rifftheraff2y ago
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.
jacobh12349
jacobh123492y ago
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
rifftheraff
rifftheraff2y ago
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.
jacobh12349
jacobh123492y ago
i think this only works for uwp apps, there isnt an appxmanifest file in my wpf app
rifftheraff
rifftheraff2y ago
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.
jacobh12349
jacobh123492y ago
thx for all the help, ill set this up tomorrow, because its like 12:30 am for me rn
Accord
Accord2y ago
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.
jacobh12349
jacobh123492y ago
i havent tried it yet, i wasnt on my computer today
Accord
Accord2y ago
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.
jacobh12349
jacobh123492y ago
didnt code again today, ill try it tomorrow
jacobh12349
jacobh123492y ago
im getting this error when trying to run the package project from following this tutorial...
rifftheraff
rifftheraff2y ago
Please check in Visual Studio Installer if you have checked "MSIX Packaging Tools".
jacobh12349
jacobh123492y ago
ok, ill check this tomorrow, because its late for me rn again..
Accord
Accord2y ago
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.
jacobh12349
jacobh123492y ago
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...
jacobh12349
jacobh123492y ago
i see these errors in the windows event viewer when it crashes.
jacobh12349
jacobh123492y ago
rifftheraff
rifftheraff2y ago
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
jacobh12349
jacobh123492y ago
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...
jacobh12349
jacobh123492y ago
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...
rifftheraff
rifftheraff2y ago
Run "Rebuild" on the package and check the output window.
jacobh12349
jacobh123492y ago
ok, it rebuilt they arent errors, they were just warnings, so the project still builds fine
Accord
Accord2y ago
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.
jacobh12349
jacobh123492y ago
no
Accord
Accord2y ago
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.
jacobh12349
jacobh123492y ago
no
Accord
Accord2y ago
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.
jacobh12349
jacobh123492y ago
no im working on other parts of my app for now and ill try to figure out the packaging later
Accord
Accord2y ago
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.
jacobh12349
jacobh123492y ago
i guess ill just let it be marked as stale and type here again when i work on this again
Accord
Accord2y ago
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.