Quantcast
Channel: Adobe Community : Popular Discussions - AIR Development
Viewing all articles
Browse latest Browse all 24121

Issue with .Net >= 4.0 and Console.ReadLine

$
0
0

I've developed simple C# application which read lines from standard input and writes them to standard output:

 

   Console.OutputEncoding = System.Text.Encoding.UTF8;

 

   Console.InputEncoding = System.Text.Encoding.UTF8;

 

   string s = Console.ReadLine();

 

   while (s != "")

   {

        Console.WriteLine(s);

 

        s = Console.ReadLine();

   }

 

 

And I developed desktop Air application which starts NativeProcess of this application and tries to write text data:

 

process.standardInput.writeUTFBytes(textToSend.text + "\n");

 

As result Air application has to receive what was sent.

But when C# application is built with .Net 3.5 everything works perfect.

But when C# application is built with .Net 4.0, .Net 4.5 or .Net 4.5.1 then I can't receive in Air application what I've sent. Additionally if I just start Air application with native process and than close it then C# application still be in Task Manager (if C# application was built with .NET >= 4.0). but if I close air application which uses C# application built with .NET 3.5 then application is gone from Task Manager.

Something is really very wrong with C# and reading standard input using .NET >= 4.0.


Viewing all articles
Browse latest Browse all 24121

Trending Articles



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