I would like to use my MAUI app to launch a separate background service on the platform that it's running on. This background service makes use of gRPC to receive data from a server when the MAUI app itself is not running. I understand that it's highly platform-dependent, so for the sake of argument, let's pretend we're doing this exclusively on Windows.
My strategy was to include the background service .exe with the .MSIX being used to install the app on the computer by simply adding the .exe to the Platform/Windows folder so that it deploys with the app. However, I can't use C# to find out where that .exe file is. WPF has a "special" folder that directs me to the Program Files folder on any system, and then C# would launch that .exe as a Windows Service. I can't find MAUI's equivalent, since MAUI's FileSystem class does not allow this.
Maybe my strategy is not the correct one. What is a good strategy for deploying background services with a MAUI app, if not this one?
Thanks!