STDIN not working for .NET program

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
sweisman
Newbie
Newbie
Posts: 1
Joined: Sat Oct 31, 2015 1:21 pm

STDIN not working for .NET program

Post by sweisman »

I have a simple .NET 4.5 console program.

I invoke it like this:

WINEARCH=win32 WINEPREFIX=~/win32 wine test.exe

Console.WriteLine() (ie STDOUT) works perfectly.

Neither Console.Read() nor Console.ReadLine() works. Ever. With max debug output (WINEDEBUG=warn+all), there is NOTHING for any keypresses.

Invoking it like this works:

WINEARCH=win32 WINEPREFIX=~/win32 WINEDEBUG=-all wineconsole --backend=curses test.exe

The problem is, I don't want the wineconsole behavior. I don't want curses. I just want plain STDIO without all the extra stuff wineconsole introduces for a very simple console program.

The Wine docs for CUI programs (www.winehq.org/docs/wineusr-guide/cui-programs) says STDIO is supposed to work:

"Maps the standard Windows streams to the standard Unix streams (stdin/stdout/stderr)."

Using Mono, STDIN works as expected, but the assemblies my program links to are not compatible with it, so unfortunately this is not a solution.

Am I missing something? Is there some way to get STDIN working with a .NET program?
Locked