I've created first application which has name a SlideShow.exe.
When I ran it I look via break point process name after such code:
Process process = Process.GetCurrentProcess();
that process.ProcessName is "SlideShow".
So than I ran second another application which must get processes by name.
Process processes = Process.GetProcessesByName("SlideShow");
and oops! processes.Length is 0.
Why? What is it a rubbish?
Hi Roman, can you still reproduce? If yes, can you please provide a repro? Thank you.
Hi Ludovic, I don't have enough time for testing your bugs.
I use mono because I like linux and hate microsoft. But if xamarin gets money for xamarin sdk and xamarin studio that let's them to work for gotten money. And if I know c++ I'd never use mono on linux OS.
If you can still reproduce, please reopen the bug with more information. Thank you.
Ok, I've reproduced this bug.
destructor@babylon-5:~ > mono --version
Mono JIT compiler version 4.8.1 (Stable 18.104.22.168/22a39d7 Wed Apr 12 12:00:40 UTC 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
LLVM: supported, not enabled.
video here https://www.dropbox.com/s/v89hdrvoy7iphyd/Process_GetProcessesByName.ogv?dl=0
solution for self-testing here https://www.dropbox.com/s/q6mgyersyhzq8cg/TestProcess.7z?dl=0
This works for me with Mono 5.4
The process name from your test I get is
Current process name is mono-sgen64