Edit : when I wrote this I thought the xUnit prerelease version of the runner was working, but I lied. I think I just got a false positive as I was switching out nuget packages
Exception is
An error occurred while analysing this project after it was built: System.Exception: Error while discovering test 'XunitSkip.UnitTests.Skip_test':System.InvalidOperationException: Sequence contains more than one element
at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
at Xunit.Sdk.XunitTestCase.Initialize()
at Xunit.Sdk.TestMethodTestCase.EnsureInitialized()
at Xunit.Sdk.TestMethodTestCase.get_SkipReason()
at nCrunch.Module.XUnit2.Integration.XUnitDiscoveryMessageSink.discoverTest(ITestCase testCase, Object[] arguments)
at nCrunch.Module.XUnit2.Integration.XUnit2TestFramework.FindFrameworkTestsInAssembly(ReflectedAssembly assembly, FilePath assemblyFilePath, IList`1 referencedAssemblyFilePaths, ComponentUniqueName testComponentUniqueName)
at nCrunch.TestExecution.TestFinder.FindTestsForFrameworks(ReflectedAssembly assembly, FilePath assemblyFilePath, IList`1 referencedAssemblyFilePaths, TestFrameworkDescription[] frameworks, ComponentUniqueName testComponentUniqueName)
at nCrunch.TestExecution.RemoteTaskRunner.AnalyseAssembly(TestFrameworkDescription[] applicableFrameworks, ComponentUniqueName testComponentUniqueName)App to reproduce is pretty simple. New console app, add xunit 2.0 and the Visual Studio Runner
using Xunit;
namespace XunitSkip
{
public class UnitTests
{
[Fact]
public void Whatever()
{
Assert.True(true);
}
[Fact]
[Skip("skipping it")]
public void Skip_test()
{
Assert.True(true);
}
}
public sealed class SkipAttribute : FactAttribute
{
public SkipAttribute(string reason = "just cause")
{
Skip = reason;
}
}
}