将一个极长的过滤器传递给 dotnet 测试?
Passing an extremely long filter to dotnet test?
我正在尝试将一个非常长的过滤器传递给 dotnet test --filter
。但是,它太长了,我收到“路径太长”错误。
还有其他方法可以指定过滤器吗?
或者以某种方式将过滤器从文件“管道”到 --filter
参数 dotnet test
?
这是一个 OS 限制。你对此无能为力。
参见:Exec and (very) long commands on Windows
cmd.exe has a maximum command-line length limit of 8191 characters
Win32's CreateProcess has a maximum lpCommandLine length of 32,768
characters.
解决方法
参见:Command prompt (Cmd. exe) command-line string limitation
Modify programs that require long command lines so that they use a
file that contains the parameter information, and then include the
name of the file in the command line.
我正在尝试将一个非常长的过滤器传递给 dotnet test --filter
。但是,它太长了,我收到“路径太长”错误。
还有其他方法可以指定过滤器吗?
或者以某种方式将过滤器从文件“管道”到 --filter
参数 dotnet test
?
这是一个 OS 限制。你对此无能为力。
参见:Exec and (very) long commands on Windows
cmd.exe has a maximum command-line length limit of 8191 characters
Win32's CreateProcess has a maximum lpCommandLine length of 32,768 characters.
解决方法
参见:Command prompt (Cmd. exe) command-line string limitation
Modify programs that require long command lines so that they use a file that contains the parameter information, and then include the name of the file in the command line.