Closed DixonDs closed 7 years ago
Sorry I don't have access to a TeamCity server, please submit a PR for any required changes.
Ok, I will try to look into it and submit a PR if I get a chance. But from what I understand, it is not specific to TeamCity (I was just giving more context here), but rather to the fact that there is no normal console window available, but console output is redirected, so properties like Console.BufferWidth
may fail.
I have the same issue when running on Jenkins. However, if I skip formatting output, it works.
So, PowershellSettings().SetFormatOutput().SetLogOutput()
, fails with "The handle is invalid".
But, new PowershellSettings().SetLogOutput()
works.
Maybe that helps with finding the problem. Thanks for the great work!
settings.OutputToAppConsole = false;
When the environment doesn't support console outputting.
It works fine on my local env, but fails when I try to run it on TeamCity:
Quick Google search lead me to this SO link that could be relevant: http://stackoverflow.com/questions/327408/the-handle-is-invalid-when-running-net-console-via-java