Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Width of PowerShell Output in the Visual Studio Output Window

I have a powershell script that runs fxcopcmd in the output window. Turns out that when I output results it limits the output to 80 Chars, is there a way to get it to be wider in the visual studio output window

like image 377
maxfridbe Avatar asked Nov 06 '22 20:11

maxfridbe


2 Answers

I've found the "solution":

To get output that does not force line wraps to match the screen width, you can use the Width parameter to specify line width. Because Width is a 32-bit integer parameter, the maximum value it can have is 2147483647. Type the following to set the line width to this maximum value:

Get-Command | Out-File -FilePath c:\temp\output.txt -Width 2147483647

Do not forget to use the -Encoding utf8 switch to avoid creating binary dung.

Finally add a type c:\temp\output.txt to the PostBuild event to see your FxCop results.

like image 138
David Schmitt Avatar answered Nov 15 '22 08:11

David Schmitt


I ended up asking my question a different way, and was solved directly: Powershell output column width

like image 23
maxfridbe Avatar answered Nov 15 '22 06:11

maxfridbe