I reduced my problem to this example:
[STAThread]
static void Main() {
var t = Task.Run(async delegate {
await Task.Delay(TimeSpan.FromSeconds(5));
return "delayed action";
});
t.Wait();
Console.WriteLine("Task t Status: {0}, Result: {1}", t.Status, t.Result);
}
While this behaves normally on my host PC, it closes before returning the "delayed action" when ran on VMware Workstation Player 15
with fresh Windows 10 installation. There are no errors. If I put another Console.WriteLine at the beginning it shows in cmd.
I assigned to VMware 4 cores and 6GB of memory, cpu virtualizations are turned off, 3d acceleration is turned on. Am I missing some dependencies, or VM needs different configuration?
My goal was to create a series of SendInput
functions that need to be spread over time. I even tried a 3rd party “clicker” tool that got a delay option and it has the same issue. I had to set it to 30ms to get clicks 500ms apparat, as if the bulk of clicks never registered. Doing same with my code did not work on VM but works OK on host PC.