testing - 在Azure Pipelines上执行Visual Studio测试任务: Updating DontShowUI to 1 failed due to exception

标签 testing .net-core azure-devops azure-pipelines vstest

我正在 Azure Pipelines 上执行 Visual Studio 测试任务。该代理在 Windows Server 2019 Datacenter 上运行,但测试在 Docker 容器中运行。

一切正常,所有测试都执行,但我在输出中看到此警告:

[warning]Updating HKCU\SOFTWARE\Microsoft\Windows\Windows Error Reporting\DontShowUI to 1 failed due to exception : System.NullReferenceException: Object reference not set to an instance of an object.

我查看了注册表,实际上该路径中没有值“DontShowUI”。我尝试添加它并将值设置为 1,但警告仍然出现。

如何消除这个警告?

最佳答案

我也有同样的警告

Task         : Visual Studio Test
Version      : 2.153.9 

接下来是更新注册表以抑制警告的正确命令:

reg add "HKCU\SOFTWARE\Microsoft\Windows\Windows Error Reporting" /v DontShowUI /t REG_DWORD /d 1 /f

关于testing - 在Azure Pipelines上执行Visual Studio测试任务: Updating DontShowUI to 1 failed due to exception,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58169928/

相关文章:

docker - 如何在dockerfile中更新asp.net核心版本

powershell - 在 VSTS Powershell 内联脚本任务中运行 drop SQL DB 时找不到类型 [Microsoft.SqlServer.Management.Smo.Server]

javascript - 使用 Mocha : app. 日志测试 flatiron cli 应用程序未定义?

javascript - 如何在 Cypress.io 中拖放

algorithm - 处理单元测试和集成测试之间的重复

c# - 数字比较作为 uint 是否比 c# 中的普通 int 快

azure - Azure DevOps 中的多个 YAML 构建管道

java - 如何让测试等待 Vert.x Verticle 部署完成

c# - 为什么三元运算符和 if 语句返回不同的结果?

c# - .net core 限制\r\n 为两行