Problem running Unit Tests in ReSharper 2020.1.4

I've been getting this semi-regularly.  The only thing that seems to help is closing Visual Studio and re-opening.  I've got two unit test assemblies with about 4000 tests between them, and a mixture of XUnit and MsTest tests (mostly XUnit).

 

2020.08.08 17:25:37.791 ERROR System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary
at JetBrains.Util.DataStructures.CompactMapBase`4.get_Item(TKey key)
at JetBrains.ReSharper.UnitTestFramework.Caches.UnitTestElementCache.CachedElements.GetOrQueryElements(UnitTestElementIdToIdentityMap uteIdToIdentityMap, Lazy`1 repository)
at JetBrains.ReSharper.UnitTestFramework.Caches.OneToSetLevelDbCache`1.GetBy(TKey key)
at JetBrains.ReSharper.UnitTestFramework.Criteria.ProjectFolderCriterion.EvaluationOptimization.<GetElementsIn>d__5.MoveNext()
at JetBrains.ReSharper.UnitTestFramework.Criteria.ProjectFolderCriterion.EvaluationOptimization.<GetElementsIn>d__5.MoveNext()
at JetBrains.ReSharper.UnitTestFramework.Criteria.ProjectFolderCriterion.EvaluationOptimization.<GetElementsIn>d__5.MoveNext()
at JetBrains.ReSharper.UnitTestFramework.Criteria.ProjectFolderCriterion.EvaluationOptimization.<GetElementsIn>d__5.MoveNext()
at JetBrains.ReSharper.UnitTestFramework.Criteria.ProjectFolderCriterion.EvaluationOptimization.<GetElementsIn>d__5.MoveNext()
at System.Collections.Generic.JetHashSet`1..ctor(IEnumerable`1 enumerable, IEqualityComparer`1 comparer)
at JetBrains.ReSharper.UnitTestFramework.Criteria.ProjectFolderCriterion.EvaluationOptimization.EvaluateCriterion(ProjectFolderCriterion criterion)
at lambda_method(Closure , Object )
at JetBrains.ReSharper.UnitTestFramework.QueryProvider.OptimizationDefinition`1.SingleParam.TryFetch(Expression expression)
at JetBrains.ReSharper.UnitTestFramework.QueryProvider.QueryProvider`1.Evaluator.WhereEvaluator.Visit(Expression node)
at JetBrains.ReSharper.UnitTestFramework.QueryProvider.QueryProvider`1.Evaluator.WhereEvaluator.EvaluateAsReadOnlySet(Expression expr)
at JetBrains.ReSharper.UnitTestFramework.QueryProvider.QueryProvider`1.Evaluator.VisitMethodCall(MethodCallExpression node)
at System.Linq.Expressions.MethodCallExpression.Accept(ExpressionVisitor visitor)
at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
at JetBrains.ReSharper.UnitTestFramework.QueryProvider.QueryProvider`1.Execute(Expression expr)
at JetBrains.ReSharper.UnitTestFramework.UnitTestElementRepository.LockingQueryProvider.Execute(Expression expr)
at JetBrains.ReSharper.UnitTestFramework.UnitTestElementRepository.LockingQuery`1.GetEnumerator()
at System.Collections.Generic.HashSet`1.UnionWith(IEnumerable`1 other)
at System.Collections.Generic.HashSet`1..ctor(IEnumerable`1 collection, IEqualityComparer`1 comparer)
at System.Collections.Generic.HashSet`1..ctor(IEnumerable`1 collection)
at System.Linq.EnumerableExJet.ToSet[TSource](IEnumerable`1 source)
at JetBrains.Util.CollectionUtil.AsSet[T](IEnumerable`1 enumerable)
at JetBrains.ReSharper.UnitTestFramework.Launch.Stages.BuildStage.CollectProjectsToBuild()
at JetBrains.ReSharper.UnitTestFramework.Launch.Stages.BuildStage.Run(CancellationToken onCancel, CancellationToken onAbort)
at JetBrains.ReSharper.UnitTestFramework.Launch.UnitTestLaunch.<RunStage>d__72.MoveNext()

1 comment
Comment actions Permalink

Hello,

 

Could you please try the latest ReSharper 2020.2 EAP9 build - https://www.jetbrains.com/resharper/nextversion and check the issue once again?

Please let me know about the results.

Thank you.

0

Please sign in to leave a comment.