Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15908

VS 2019 Console from Winform App not writing lines

$
0
0
I have some apps that, based on command lines when launched, will either display a form, or launch some commands via a console window. I just upgraded from VS2013 to 2019, and the console.writeline seems to be sending to the VS output debug instead of the actual console window.

For instance (Again this is a winform app not console):

Private Declare Auto Function AllocConsole Lib "kernel32.dll" () As Boolean
AllocConsole()
Console.WriteLine("Test")

This shows "Test" in the debug output window of VS and the console window remains blank.

I have read a bit about ways to re-direct the output, but it seems like there should be an easier way. Is there?

Viewing all articles
Browse latest Browse all 15908

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>