我正在尝试使用Linux容器运行单元测试,我代码的最终构建输出是testapp.exe文件,因此我已使用Windows代理构建了testapp.exe。复制了构建文件并创建了Linux mono docker映像,但是当我尝试在容器内执行测试时,出现以下错误。有什么办法可以摆脱这个错误?我用来执行测试的CMD命令如下。
CMD mono /app/nunit/nunit3-console.exe /app/xxxxx/xxxxx/bin/Release/testapp.exe --test="xxxxxxx.xxxxxx.xxxxxTests.xxxxxx.xxxxxxxTest" --workers=2 --dispose-runners --result=/tmp/Result.xml
1) SetUp Error : xxxxxxx.xxxxxx.xxxxxTests.xxxxxx.xxxxxxxTest
System.IO.IOException : Cannot create /app/xxxxx/xxxxx/bin/Release/testapp.exe because a file with the same name already exists.
at System.IO.Directory.CreateDirectory (System.String path) [0x0006a] in <7b0d87324cab49bf96eac679025e77d1>:0
at System.IO.DirectoryInfo.Create () [0x00000] in <7b0d87324cab49bf96eac679025e77d1>:0
at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo.Create()
这个Nunit控制台是否正在尝试重新构建代码?