I am trying to execute a C# 4.0 console application from a perl script and trying to capture the output of the application. The C# application is a multithreaded application but it is writing the output to the console using the normal Console.WriteLine() function.
To fetch the output I am using the `` method in perl as :
my @commands = `app.exe param1 param2`
But when I am running the script I am getting error:
Unhandled Exception: System.IO.IOException: The handle is invalid.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.Console.SetCursorPosition(Int32 left, Int32 top)
at Netapp.CmDownload.Processor.DownloadProcessor.Start(String[] args)
at Netapp.CmDownload.CmDownload.Main(String[] args)
terminating the application.
Note: C# application is a 64bit app running on .Net Framework 4.0 I have tried running the script using active perl 64bit as well as 32 bit version with no effect.