1

我将 NDepend 6 与 TeamCity 10.0.2 一起使用,并且在 NDepend 构建步骤中出现错误。查看构建日志,会出现:

[步骤 6/9] 恢复趋势商店 (1s)

[17:59:26][Restoring trend store] Requesting last finished build http://localhost/httpAuth/app/rest/buildTypes/ProjectName/builds?locator=count:1,personal:false,canceled:false,tags:ndepend_metrics
[17:59:27][Restoring trend store] Restoring trend store to C:\TeamCity\buildAgent\work\d91e7b421f32292a\LastTrendMetrics.zip
[17:59:27][Restoring trend store] Downloading artifact http://localhost/httpAuth/app/rest/builds/id:5783/artifacts/content/NDependOut/TrendMetrics.zip to C:\TeamCity\buildAgent\work\d91e7b421f32292a\LastTrendMetrics.zip
[17:59:29]
[Step 6/9] 
Exception.Type {System.Net.WebException}
Exception.Message {The remote server returned an error: (400) Bad Request.}
Exception.StackTrace {
  System.Net.WebClient.DownloadFile(Uri address, String fileName)   L_00ca 
  NDepend.TeamCity.Artifacts.RestoreTrendStore.DownloadTrendStoreZip(Int32 lastFinishedBuildId, String lastTrendMetricsZip)   L_003c 
  NDepend.TeamCity.Artifacts.RestoreTrendStore.DoRestore()   L_006b 
  NDepend.TeamCity.Artifacts.RestoreTrendStore.Restore()   L_0011 
  NDepend.TeamCity.NDependRunner.RestoreArtifacts()   L_001c 
  NDepend.TeamCity.NDependRunner.Run()   L_0006 
  NDepend.TeamCity.Program.MainSub(String[] args)   L_002c 

}

Exception.InnerException = null

查看来自 URL 的实际响应:

URL: http://localhost/httpAuth/app/rest/builds/id:5783/artifacts/content/NDependOut/TrendMetrics.zip

RESPONSE:
    Responding with error, status code: 400 (Bad Request).
    Details: jetbrains.buildServer.server.rest.errors.BadRequestException: Cannot provide children list for file ''.
    Invalid request. Please check the request URL and data are correct.

这一切在 TeamCity 9 中运行良好;迁移到新服务器并升级到 TeamCity 10 后问题开始出现。我不一定关心 NDepend 的内部趋势跟踪,所以如果有某种方法可以禁用这部分分析,那也很好。

4

1 回答 1

1

该问题的解决方法是转到 NDepend 构建步骤并取消选中“存档趋势存储”选项:

在此处输入图像描述

于 2016-11-02T22:37:57.813 回答