从菜单栏启动时,单元测试未运行

时间:2020-06-21 14:27:09

标签: c# macos visual-studio unit-testing

我已经为同一解决方案中的MSTest项目中的一个项目编写了单元测试。

我使用的是Visual Studio for Mac Community,因此我可以使用Unit Tests Pad运行测试,并且可以运行。 我也可以使用 dotnet test 从终端运行它们,该方法也可以运行。 不过,当使用Run > Run Unit Tests时,仍然出现以下错误:

Could not execute because the specified command or file was not found.
Possible reasons for this include:
  * You misspelled a built-in dotnet command.
  * You intended to execute a .NET Core program, but dotnet-/usr/local/share/dotnet/dotnet does not exist.
  * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
The application was terminated by a signal: SIGHUP

所以,我知道我没有拼错任何东西,并检查了$ PATH以确认它是否包含/ usr / local / share / dotnet / dotnet并包含它。 我不知道清单中第三点的含义。 我已经使用Troubleshoot .NET Core tool usage issues来获得一些指导,并在this .NET Core tools list中搜索了我可能需要的可能工具,但没有弄清楚。

我也在测试结果中获得了以下信息:无法获取以下源代码的位置:LearnCSharpByCoding。(解决方案的名称)。

知道为什么会这样吗?

0 个答案:

没有答案
相关问题