I attempted to use this post to help me https://stackoverflow.com/questions/4362111/how-do-i-show-a-console-output-window-in-a-forms-application use a console on a WinForms application but the output will not show, I have read over the "Duplicate questions" page and they all don't answer my question
I've tried using Debug. WriteLine but it doesn't work either. I'm assuming I'm missing a setting of some sort but they all say "use Managed Compatibility Mode" but its been gone for years, I'm having it open the console on a button press, and it opens the console it just won't output anything I've also tried "FreeConsole()" but it doesn't even open.
[DllImport("kernel32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool AllocConsole();
private void button1_Click(object sender, EventArgs e)
{
AllocConsole();
string message1 = "test123";
Console.WriteLine(message1);
}