Unit testing NUnit TestCaseAttribute导致NUnit VS Adapter出现不明确的UsMatchException

Unit testing NUnit TestCaseAttribute导致NUnit VS Adapter出现不明确的UsMatchException,unit-testing,nunit,azure-devops,vs-unit-testing-framework,parameterized-tests,Unit Testing,Nunit,Azure Devops,Vs Unit Testing Framework,Parameterized Tests,我编写了一系列单元测试,利用了。当我使用ReSharper单元测试运行程序时,这些测试在本地机器上运行得非常好。不幸的是,当我使用NUnit VS Adapter 2.0.0.0通过Visual Studio运行测试时,我得到了以下输出: ------ Run test started ------ NUnit VS Adapter 2.0.0.0 executing tests is started Loading tests from D:\Projects\Ever\WebApp\Ever

我编写了一系列单元测试,利用了。当我使用ReSharper单元测试运行程序时,这些测试在本地机器上运行得非常好。不幸的是,当我使用NUnit VS Adapter 2.0.0.0通过Visual Studio运行测试时,我得到了以下输出:

------ Run test started ------
NUnit VS Adapter 2.0.0.0 executing tests is started
Loading tests from D:\Projects\Ever\WebApp\Ever.UnitTests\bin\Debug\Ever.UnitTests.dll
Exception System.Reflection.AmbiguousMatchException, 
   Exception thrown executing tests in 
      D:\Projects\Ever\WebApp\Ever.UnitTests\bin\Debug\Ever.UnitTests.dll
NUnit VS Adapter 2.0.0.0 executing tests is finished
========== Run test finished: 0 run (0:00:00.8290488) ==========
我们使用Visual Studio在线托管的构建服务器进行构建,依赖测试适配器运行NUnit单元测试。这意味着我需要找到一种方法使这个属性可以工作(更可取),或者我必须绕过这个限制


我是否必须放弃使用TestCaseAttribute,因为MSTest不支持参数化测试?

在进一步调试和测试后,我得出结论,TestCaseAttribute不是问题的原因。我在回答我自己的问题,而不是删除1,以防其他人落入与我相同的陷阱

TestCaseAttribute工作正常,正如您在以下测试中看到的那样。这些测试通过VS测试适配器和ReSharper测试运行程序运行良好

[TestFixture]
公共类SimpleReproTest
{
[测试]
[测试用例(真、假)]
[测试用例(假、真)]
公共无效不产生问题(bool a、bool b)
{
Assert.IsTrue(a | | b);
}
[测试]
[测试用例(“,假,真)]
[测试用例(null、true、false)]
公共无效不产生问题(字符串a、布尔b、布尔c)
{
Assert.IsTrue(b | | c);
Assert.IsNullOrEmpty(a);
}
}
这一问题似乎只出现在已经完成的测试中


1:根据这些信息编辑我的问题会把它变成a,不鼓励这样做,所以我也放弃了这个选项