Bug 44937 - System.Diagnostics.StartProcess does not detect dotnetcore compiled assemblies as managed
Summary: System.Diagnostics.StartProcess does not detect dotnetcore compiled assemblie...
Alias: None
Product: Runtime
Classification: Mono
Component: io-layer ()
Version: 4.6.0 (C8)
Hardware: Macintosh Mac OS
: --- major
Target Milestone: 4.8.0 (C9)
Assignee: Bugzilla
Depends on:
Reported: 2016-09-30 12:53 UTC by Jon Dick
Modified: 2016-10-18 09:10 UTC (History)
5 users (show)

Is this bug a regression?: ---
Last known good build:

Repro solution (33.94 KB, application/zip)
2016-09-30 12:53 UTC, Jon Dick

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Jon Dick 2016-09-30 12:53:17 UTC
Created attachment 17828 [details]
Repro solution

Traditionally we've been able to do something like this in our code, running on Mono on OSX:
    System.Diagnostics.Process.Start ("/path/to/ManagedAssembly.exe");

Mono would implicitly detect that it was a .NET managed assembly and start it up without explicitly invoking it through mono.

It appears that this detection does not work to detect assemblies compiled with dotnetcore's compiler, even when they are compiled to target the .NET 4.5 Framework and otherwise run just fine under mono.

I've attached a very simple repro case to illustrate the issue (README contained inside the .zip).

While this may be seemingly innocent, it's causing major issues with projects such as http://cakebuild.net which is now being compiled with dotnetcore and relies heavily on Process.Start invocations with the implicit managed assembly detection.
Comment 2 Alexander Köplinger [MSFT] 2016-10-10 12:03:18 UTC
PR with fix: https://github.com/mono/mono/pull/3745
Comment 3 Alexander Köplinger [MSFT] 2016-10-11 15:31:22 UTC
Fixed in master/f7b73f070a5031f04837461757d8cf9ea34b5f67 and mono-4.8.0-branch/dca5ff953f24cf6d88f5977f5c45032938d5cb32