I have a problem with a third-party COM library. I'm using C# to call a function from the library. It works, but it unexpectedly writes some debug data to the console window. I tried redirecting the output to a file, but it didn't succeed. I tried to redirect output streams from 1 to 5.
The commands I use for redirection look like
myapp.exe 1> output.txt
How is it possible to write to the console, but not to the output stream?
I've also tried:
myapp.exe 1> output.txt 2> outputerr.txt 3> output3.txt 4> output4.txt 5> output5.txt
All files were created. File output.txt had my own strings I'd printed with Console.WriteLine. File output3.txt captured Windows command prompt after the program finished. Other files were empty. The data were still printed to screen.