views:

93

answers:

3

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

A: 

powershell's text output facilities usually have a -width option that controls how often they insert line breaks.

DDaviesBrackett
+1  A: 

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.

David Schmitt
A: 

I ended up asking my question a different way, and was solved directly: http://stackoverflow.com/questions/978777/powershell-output-column-width

maxfridbe