P \ Invoke:
[DllImport("kernel32.dll")] [return: MarshalAs(UnmanagedType.Bool)] static extern bool AllocConsole(); Call:
if (AllocConsole()) { // Этот блок выполняется, но текст в консоль не выводится Console.WriteLine("Console Runned!"); } ps VS 2017RC, when you call not from under VS, everything works stably. What is the reason?