Best way to send my app a command
I want to send my Windows GUI app a command. It uses WPF and WinForms. The app will be running in VS via pressing the F5 key. Specifically I want to be able to hit a hotkey (of my choosing) while VS has focus but my app is running (minimized) via F5 and have two things happen. So for example...
Step 1) Run my app via F5.
Step 2) Minimize my app. (or the app may not even have a window open since sometimes I have it start with only a Tray Icon)
Step 3) In VS hit a hotkey that should do the next two steps.
Step 4) Have VS save all my files.
Step 5) Send my app a message notifying it that I have pressed this hotkey so that it can take action.
I can write a custom "Command" in C# (up to C# v8) using this extension https://vlasovstudio.com/visual-commander/index.html
Or I can write my own VS Extension which I have done before - that said, I am trying to avoid writing an VS Extension.
First my custom command would run the "Save All" command in VS. Then I want that same command to run some additional code to send my app a message/command. I want to know what is the best way for my command to talk to my app.
The message/command that I send will initially not require any accompanying data to be sent to my app but it probably will need some data (i.e. parameters) in a future version.
I am considering the following options and am looking for feedback (hopefully from someone who has experience doing something like this):
Options I have considered for sending the message/command to my app:
1) Windows Pipes
2) RPC / gRPC
3) Windows Message (i.e. via the Windows message pump)
4) Create a file on the hard drive that my app knows to look for
5) In memory (RAM) shared file
6) Run a webserver inside my app and then hit a special URL that it exposes
I want to do this from VS, but I am open to using VS Code, Rider, or an extension for VS or VS Code if one exists. (or I may need to write one myself)
What do you recommend? Any help is appreciated, thanks!
Step 1) Run my app via F5.
Step 2) Minimize my app. (or the app may not even have a window open since sometimes I have it start with only a Tray Icon)
Step 3) In VS hit a hotkey that should do the next two steps.
Step 4) Have VS save all my files.
Step 5) Send my app a message notifying it that I have pressed this hotkey so that it can take action.
I can write a custom "Command" in C# (up to C# v8) using this extension https://vlasovstudio.com/visual-commander/index.html
Or I can write my own VS Extension which I have done before - that said, I am trying to avoid writing an VS Extension.
First my custom command would run the "Save All" command in VS. Then I want that same command to run some additional code to send my app a message/command. I want to know what is the best way for my command to talk to my app.
The message/command that I send will initially not require any accompanying data to be sent to my app but it probably will need some data (i.e. parameters) in a future version.
I am considering the following options and am looking for feedback (hopefully from someone who has experience doing something like this):
Options I have considered for sending the message/command to my app:
1) Windows Pipes
2) RPC / gRPC
3) Windows Message (i.e. via the Windows message pump)
4) Create a file on the hard drive that my app knows to look for
5) In memory (RAM) shared file
6) Run a webserver inside my app and then hit a special URL that it exposes
I want to do this from VS, but I am open to using VS Code, Rider, or an extension for VS or VS Code if one exists. (or I may need to write one myself)
What do you recommend? Any help is appreciated, thanks!