• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Issue with .Net >= 4.0 and Console.ReadLine

New Here ,
Nov 26, 2014 Nov 26, 2014

Copy link to clipboard

Copied

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.

TOPICS
Development

Views

916

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 04, 2015 Nov 04, 2015

Copy link to clipboard

Copied

Did you ever figure this out?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 24, 2016 Oct 24, 2016

Copy link to clipboard

Copied

LATEST

Just ran into the same problem, can anyone help?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines