.Net Core 2.0 Process.Start throws “The specified executable is not a valid application for this OS platform”

You can also set the UseShellExecute property of ProcessStartInfo to true

var p = new Process();
p.StartInfo = new ProcessStartInfo(@"C:\Users\user2\Desktop\XXXX.reg")
{ 
    UseShellExecute = true 
};
p.Start();

Seems to be a change in .net Core, as documented here.

See also breaking changes.

Leave a Comment