Create a gist now

Instantly share code, notes, and snippets.

StackTrace of NCrunch running STAExamples
An error occurred while analysing this project after it was built: System.TypeLoadException: Could not load type 'Xunit.LongLivedMarshalByRefObject' from assembly 'xunit.execution.desktop, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c'.
at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes)
at System.Reflection.RuntimeAssembly.GetExportedTypes()
at System.Reflection.Assembly.get_ExportedTypes()
at Xunit.Sdk.ReflectionAssemblyInfo.GetTypes(Boolean includePrivateTypes)
at Xunit.Sdk.TestCollectionFactoryHelper.GetTestCollectionDefinitions(IAssemblyInfo assemblyInfo, IMessageSink diagnosticMessageSink)
at Xunit.Sdk.CollectionPerClassTestCollectionFactory..ctor(ITestAssembly testAssembly, IMessageSink diagnosticMessageSink)
at Xunit.Sdk.ExtensibilityPointFactory.GetXunitTestCollectionFactory(IMessageSink diagnosticMessageSink, IAttributeInfo collectionBehaviorAttribute, ITestAssembly testAssembly)
at Xunit.Sdk.XunitTestFrameworkDiscoverer..ctor(IAssemblyInfo assemblyInfo, ISourceInformationProvider sourceProvider, IMessageSink diagnosticMessageSink, IXunitTestCollectionFactory collectionFactory)
at Xunit.Sdk.XunitTestFramework.CreateDiscoverer(IAssemblyInfo assemblyInfo)
at Xunit.Sdk.TestFramework.GetDiscoverer(IAssemblyInfo assemblyInfo)
at Xunit.Sdk.TestFrameworkProxy.GetDiscoverer(IAssemblyInfo assembly)
at nCrunch.Module.XUnit2.Integration.XUnit2TestFramework.<>c__DisplayClass4_0.<FindFrameworkTestsInAssembly>b__0()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Common.PerformanceTracking.PerfTracker.TryTrackActivity(String name, Action activity)
at nCrunch.Module.XUnit2.Integration.XUnit2TestFramework.FindFrameworkTestsInAssembly(ReflectedAssembly assembly, FilePath assemblyFilePath, IList`1 referencedAssemblyFilePaths, ComponentUniqueName testComponentUniqueName)
at nCrunch.TestExecution.TestFinder..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.TestExecution.TestFinder..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
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, PerfTracker perfTracker)
reproducible via: https://github.com/tiesmaster/samples.xunit/tree/sta-examples-on-stable-xunit-nuget-packages
An error occurred while analysing this project after it was built: System.Exception: Exception during discovery:
System.InvalidCastException: Unable to cast object of type 'STAExamples.WpfTestCase' to type 'Xunit.Sdk.XunitTestCase'.
at nCrunch.Module.XUnit2.Integration.XUnitDiscoveryMessageSink.OnMessage(IMessageSinkMessage message)
at nCrunch.Module.XUnit2.Integration.XUnitMessageSinkAdapter.OnMessage(IMessageSinkMessage message)
at Xunit.Sdk.SynchronousMessageBus.QueueMessage(IMessageSinkMessage message)
at Xunit.Sdk.XunitTestFrameworkDiscoverer.FindTestsForMethod(ITestMethod testMethod, Boolean includeSourceInformation, IMessageBus messageBus, ITestFrameworkDiscoveryOptions discoveryOptions)
at Xunit.Sdk.XunitTestFrameworkDiscoverer.FindTestsForType(ITestClass testClass, Boolean includeSourceInformation, IMessageBus messageBus, ITestFrameworkDiscoveryOptions discoveryOptions)
at Xunit.Sdk.TestFrameworkDiscoverer.FindTestsForTypeAndWrapExceptions(ITestClass testClass, Boolean includeSourceInformation, IMessageBus messageBus, ITestFrameworkDiscoveryOptions discoveryOptions)
at nCrunch.Module.XUnit2.Integration.XUnit2TestFramework.FindFrameworkTestsInAssembly(ReflectedAssembly assembly, FilePath assemblyFilePath, IList`1 referencedAssemblyFilePaths, ComponentUniqueName testComponentUniqueName)
at nCrunch.TestExecution.TestFinder..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.TestExecution.TestFinder..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
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, PerfTracker perfTracker)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment