2

看起来这是一个环境问题,当我运行整体工具并且 AppVeyor 服务器说它不包含TableEntityJenkins 工作区下的 Azure 时。

packages\coveralls.io.1.3.4\tools\coveralls.net.exe --opencover coverage.xml
An unknown exception has occurred.
Could not find a part of the path 'c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\Common\Table\TableEntity.cs'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at Coveralls.Net.LocalFileSystem.ComputeHash(String path) in c:\projects\coveralls-net-gmbph\coveralls.net\LocalFileSystem.cs:line 27
   at Coveralls.CoverallsBootstrap.get_CoverageFiles() in c:\projects\coveralls-net-gmbph\Coveralls.Lib\CoverallsBootstrap.cs:line 124
   at Coveralls.Net.Program.Run(CommandLineOptions options) in c:\projects\coveralls-net-gmbph\coveralls.net\Program.cs:line 40
   at Coveralls.Net.Program.Main(String[] args) in c:\projects\coveralls-net-gmbph\coveralls.net\Program.cs:line 18
Command exited with code 1

https://ci.appveyor.com/project/TianyuanC/dals/build/1.0.54

4

1 回答 1

0

我有一个类似的问题。显然,根据该工具的来源,它会解析 XML 并对其路径进行处理。当它发现无效路径时,它会抛出该错误。因此,解决方案是仅过滤掉调用 OpenCover 时需要的程序集(或与工作服一起使用的任何工具)。他们不会在 中coverage.xml,因此不会对他们采取行动。

有关 OpenCover 过滤器的更多信息(因为它是 AppVayor + Coverall 最常见的场景),请查看此处

于 2016-02-22T23:51:19.627 回答