"The StreamReader.ReadToEnd method did not seem to be able to detect the end of the file on Console.In"
It seems you were able to interact with .NET. But you called StreamReader.ReadToEndon the console tab. This can be problematic even without Perl. Excerpt from this:
ReadToEnd assumes that the thread knows when it has reached its goal. For interactive protocols in which the server sends data only when you ask for it and does not close the connection, ReadToEnd can be blocked indefinitely and should be avoided.
Your code may be right, but you need to use a different method for your purpose.
Edit:
"I ended up writing a trivial .NET console application as a wrapper"
, (Perl .NET). (Console.In/Out) , StreamReader.Read StreamReader.ReadLine .NET , , . null, EOF.
, Perl, .NET. I.e., , .NET , Perl, . Perl . , PerlSharp.