NDepend VSTS 构建任务 运行 但不产生任何结果
NDepend VSTS Build task run but do not produce any result
我已将 NDepend VSTS 任务配置为 indicated,但仪表板保持空白并将我重定向到配置文档。
我还检查了 "Stop the Build when at least one Quality Gate fails" 选项,即使 NDepend 检测到 2 个门失败,构建仍然被认为是成功的。
这里是 NDepend 任务日志:
##[section]Starting: NDependTask
-------------------------------------------------------------
Task : NDepend Task
Description : NDepend Task
Version : 1.7.0
Author : NDEPEND
Help : Replace with markdown to show in help
-------------------------------------------------------------
Preparing task execution handler.
Executing the powershell script: d:\a_tasks\NDependTask_94137ea2-81f0-411a-9527-b1400d722332.7.0\ndepend.ps1
System.Management.Automation.ParameterBindingValidationException
Cannot validate argument on parameter 'Url'. The argument is null or empty.
Provide an argument that is not null or empty, and then try the command again.
No previous build analyzed by ndepend is found to compare with.
##[warning]The ndproj file is not defined, the default one will be used
D:\a_tasks\NDependTask_94137ea2-81f0-411a-9527-b1400d722332.7.0\Integration\VSTS\VSTSAnalyzer.exe /outputDirectory "d:\a\a" /sourceDirectory "d:\a\s" /excludePattern ".test." /identifier "default" /hub "https://laedit2.visualstudio.com/IASI/_apps/hub/ndepend.ndependextension.NDepend.Hub" /coverageDir "d:\a\TestResults;d:\a\s;d:\a\s" /stopBuild /errorCode 1
Run Analysis!
2 quality gates fail.
- 'Critical Rules Violated' value 2 rules greater than fail threshold 0 rules
- 'Debt Rating per Namespace' value 1 namespaces greater than fail threshold 0 namespaces
##[error]Unexpected exit code 1 returned from tool VSTSAnalyzer.exe
##[section]Finishing: NDependTask
我还需要配置其他东西吗?
NDepend 的 Visual Studio 集成与我计算机上的相同 ndproj 完美配合。
编辑:
我用的是任务试用版
该问题可通过以下步骤重现:
- 新控制台应用程序 (.net 4.5.2)
- Visual Studio 中的 NDepend 菜单/将新的 NDepend 项目附加到解决方案
- 将项目发布到 VSTS 并根据 Visual Studio 建议创建此构建定义:
和 NDepend 构建任务:
VSTS 构建结果尽管 Unexpected exit code 1 returned from tool VSTSAnalyzer.exe
:
Here 是带有 ndproj 和构建日志的项目。
我注意到以下异常:
System.Management.Automation.ParameterBindingValidationException
Cannot validate argument on parameter 'Url'. The argument is null or empty.
Provide an argument that is not null or empty, and then try the command again.
但是我在 NDepend 任务定义中的任何地方都找不到 'Url' 参数,所以我不知道它是否相关。
在与 NDepend 的 VSTS 团队进行电子邮件交流后,NDepend VSTS 构建任务中似乎存在问题,但已得到修复。
也就是说,值得注意的是,如果选中 "Stop the Build when at least one Quality Gate fails" 选项并且您的项目有一些质量门失败,则不会存储 NDepend 结果。
因此,如果您的项目从未成功构建,NDepend 仪表板会将您重定向到 "How-To" 部分。
我已将 NDepend VSTS 任务配置为 indicated,但仪表板保持空白并将我重定向到配置文档。
我还检查了 "Stop the Build when at least one Quality Gate fails" 选项,即使 NDepend 检测到 2 个门失败,构建仍然被认为是成功的。
这里是 NDepend 任务日志:
##[section]Starting: NDependTask
-------------------------------------------------------------
Task : NDepend Task
Description : NDepend Task
Version : 1.7.0
Author : NDEPEND
Help : Replace with markdown to show in help
-------------------------------------------------------------
Preparing task execution handler.
Executing the powershell script: d:\a_tasks\NDependTask_94137ea2-81f0-411a-9527-b1400d722332.7.0\ndepend.ps1System.Management.Automation.ParameterBindingValidationException
Cannot validate argument on parameter 'Url'. The argument is null or empty.
Provide an argument that is not null or empty, and then try the command again.
No previous build analyzed by ndepend is found to compare with.##[warning]The ndproj file is not defined, the default one will be used
D:\a_tasks\NDependTask_94137ea2-81f0-411a-9527-b1400d722332.7.0\Integration\VSTS\VSTSAnalyzer.exe /outputDirectory "d:\a\a" /sourceDirectory "d:\a\s" /excludePattern ".test." /identifier "default" /hub "https://laedit2.visualstudio.com/IASI/_apps/hub/ndepend.ndependextension.NDepend.Hub" /coverageDir "d:\a\TestResults;d:\a\s;d:\a\s" /stopBuild /errorCode 1
Run Analysis!
2 quality gates fail.
- 'Critical Rules Violated' value 2 rules greater than fail threshold 0 rules
- 'Debt Rating per Namespace' value 1 namespaces greater than fail threshold 0 namespaces
##[error]Unexpected exit code 1 returned from tool VSTSAnalyzer.exe##[section]Finishing: NDependTask
我还需要配置其他东西吗?
NDepend 的 Visual Studio 集成与我计算机上的相同 ndproj 完美配合。
编辑:
我用的是任务试用版
该问题可通过以下步骤重现:
- 新控制台应用程序 (.net 4.5.2)
- Visual Studio 中的 NDepend 菜单/将新的 NDepend 项目附加到解决方案
- 将项目发布到 VSTS 并根据 Visual Studio 建议创建此构建定义:
和 NDepend 构建任务:
VSTS 构建结果尽管 Unexpected exit code 1 returned from tool VSTSAnalyzer.exe
:
Here 是带有 ndproj 和构建日志的项目。
我注意到以下异常:
System.Management.Automation.ParameterBindingValidationException
Cannot validate argument on parameter 'Url'. The argument is null or empty.
Provide an argument that is not null or empty, and then try the command again.
但是我在 NDepend 任务定义中的任何地方都找不到 'Url' 参数,所以我不知道它是否相关。
在与 NDepend 的 VSTS 团队进行电子邮件交流后,NDepend VSTS 构建任务中似乎存在问题,但已得到修复。
也就是说,值得注意的是,如果选中 "Stop the Build when at least one Quality Gate fails" 选项并且您的项目有一些质量门失败,则不会存储 NDepend 结果。
因此,如果您的项目从未成功构建,NDepend 仪表板会将您重定向到 "How-To" 部分。