https://bugs.winehq.org/show_bug.cgi?id=52761
--- Comment #3 from Esme Povirk madewokherd@gmail.com --- I'm not sure which CreateProcess causes the console to be created. It could be this:
https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/mscoree/tests/mscoree...
or this:
https://github.com/madewokherd/wine-mono/blob/develop/tools/csc-wrapper/csc-...
Since Windows doesn't seem to create these extra console windows, and the mscoree test code is the same, I have to assume it's the CreateProcess in csc-wrapper that creates a console window.
I didn't originally write csc-wrapper.cs, that was from Fabian Maurer, so I don't know why we use these settings in particular to create the process. AFAICT the "OutputDataReceived" handler doesn't actually work.
What we ideally want is for the child process to inherit the current process's stdout and not create its own console (unless csc-wrapper would create one, in which case it should use the same one). Maybe that means we should AttachConsole before creating the process?
(Though really, ideally we should have a csc.exe that works without creating another process.)