简体   繁体   English

克隆存储库后无法运行C#单元测试

[英]Unable to run C# unit tests after cloning repository

I am trying to run unit tests in a C# project that I have been working on, I have it in a repository in github and I cloned that repository to a desktop machine after creating it on my laptop. 我试图在我一直在从事的C#项目中运行单元测试,我将其存储在github中的存储库中,并在笔记本电脑上创建该存储库后将其克隆到台式机。

When I try to run the unit tests I get this message in the console. 当我尝试运行单元测试时,我在控制台中收到此消息。

No test is available in C:\\source\\repos\\server.csproj C:\\source\\repos\\UnitTests\\UnitTests.csproj. C:\\ source \\ repos \\ server.csproj C:\\ source \\ repos \\ UnitTests \\ UnitTests.csproj中没有可用的测试。 Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again. 确保已注册测试发现者和执行者,并且平台和框架版本设置正确,然后重试。

The paths here have been anonymized. 这里的路径已匿名。

I am suspicious that I inappropriately included a file in my gitignore, but not sure it that is actually the case or what file might have been ignored incorrectly. 我怀疑自己是否在gitignore中不适当地包含了一个文件,但不确定是实际情况,还是不确定什么文件可能被错误地忽略了。 I used a sample that is available on github and haven't modified it. 我使用了一个在github上可用的示例,但尚未对其进行修改。

Has anybody run into this and have any advice on how to fix it? 有没有人遇到这个问题,并且对如何解决它有任何建议?

Make sure the test settings matches your processor architecture. 确保测试设置与您的处理器体系结构匹配。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM