UWP App communication with another process (*.exe)

DotNET Fan 211 Reputation points
2024-10-04T03:20:43.5166667+00:00

UWP Experts,

We have a UWP app where we use a third party process (*.exe) and get the updates for file conversions.

We call the process using .NET Process class and get the conversion updates and based on the process exit code it is decided that the conversion is a success or not. Also we can cancel the conversion using the Cancellation Token.

This works well in the debug and release mode from Visual Studio. Unfortunately when it is installed from the windows store , it throws the exception

"An error in a system binary was detected.Try refreshing the PC to fix the problem".

We have tested in multiple systems and it shows the same issue.

Based on our initial investigation this is something to do with the permission as the UWP app is run in sandboxed env.

  1. Is building a seperate fulltrust process configured through the package manifest an option here?
  2. Is Named pipes in fulltrust process and UWP an option here? Are there any restrictions?
  3. if we go with .net single contained process using Appserviceconnection class that communicates with the third party exe , it is limited as it can't work with .net5 or above and throws the build error.

Error NETSDK1130 Windows.WinMD cannot be referenced. Referencing a Windows Metadata component directly when targeting .NET 5 or higher is not supported.

What are the other good options here to communicate with the thirdparty process and get updates and cancellation?

Thanks

Universal Windows Platform (UWP)
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.