I have an Enterprise LOB scenario, where I need to communicate between my Sideloaded UWP app and multiple console applications which are developed by third parties. Internally, these console apps will be interfacing with COM ports and hardware devices.
Can I use App Service to communicate between UWP and out-of-package Console App?
Further more, the communication must be two way and asynchronous, expected flow:
I have already referred the links below but according to them "Windows Application Packaging Project" is a must.
Please do suggest if there are any other alternatives too.
EDIT:
It is possible to start out-of-package Console Apps from UWP using 2 methods:
However, it is not possible to communicate between the out-of-package Console App and the UWP via the App Service. Even though, the Console app has reference to Microsoft.Windows.SDK.Contracts nuget package and can access AppServiceConnection API since AppServiceConnection class has the DualApiPartitionAttribute. The connection cannot be established with the AppServiceUnavailable Error.
Hence, Now I'm trying a new solution with option 1 from above as mentioned here: https://learn.microsoft.com/answers/questions/1166/how-uwp-can-communicate-with-windows-service.html?childToView=1211#answer-1211
Fallback options that need investigation:
I finally completed with many workarounds involved, I'm still looking for better solutions though. My LOB scenario is kind of a special case(refer question) and works fine for me but for others I dont recommend this solution.
Constraints with the solution: