gpt4 book ai didi

visual-studio - Visual Studio 输出窗口中 PowerShell 输出的宽度

转载 作者:行者123 更新时间:2023-12-04 21:27:36 27 4
gpt4 key购买 nike

我有一个在输出窗口中运行 fxcopcmd 的 powershell 脚本。原来,当我输出结果时,它会将输出限制为 80 个字符,有没有办法让它在 Visual Studio 输出窗口中变得更宽

最佳答案

我找到了 "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



不要忘记使用 -Encoding utf8切换以避免产生二元粪便。

最后添加一个 type c:\temp\output.txt到 PostBuild 事件以查看您的 FxCop 结果。

关于visual-studio - Visual Studio 输出窗口中 PowerShell 输出的宽度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/982620/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com