Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to xunit.runner.visualstudio 3.0.0 breaks net48 unit tests #48

Open
1 of 2 tasks
6bee opened this issue Dec 20, 2024 · 1 comment
Open
1 of 2 tasks

Update to xunit.runner.visualstudio 3.0.0 breaks net48 unit tests #48

6bee opened this issue Dec 20, 2024 · 1 comment
Assignees

Comments

@6bee
Copy link
Owner

6bee commented Dec 20, 2024

Description

Update of xunit.runner.visualstudio from 2.8.2 to 3.0.0 breaks a bunch of unit tests when executed under .NET 4.8 with a failure to resolve System.Linq.Async.Queryable methods via Aqua.TypeSystem.TypeResolver:

Aqua.TypeSystem.TypeResolverException : Failed to resolve method 'System.Threading.Tasks.ValueTask`1[System.Double] System.Linq.AsyncQueryable.AverageAsync(System.Linq.IAsyncQueryable`1[System.Int32], System.Threading.CancellationToken)'

  Stack Trace: 
RemoteToSystemLinqTranslator.ResolveMethod(MethodInfo method) line 111
RemoteToSystemLinqTranslator.VisitMethodCall(MethodCallExpression node) line 333
RemoteToSystemLinqTranslator.Visit(Expression node) line 88
RemoteToSystemLinqTranslator.ToExpression(Expression expression) line 79
ExpressionTranslationExtensions.ToLinqExpression(Expression expression, IExpressionFromRemoteLinqContext context) line 58
ExpressionExecutor`2.Transform(Expression expression) line 76
<ExecuteAsync>d__1.MoveNext() line 45
--- End of stack trace from previous location where exception was thrown ---
ExceptionDispatchInfo.Throw()
TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
<11 more frames...>

Short-term Resolution

  • xunit.runner.visualstudio is reverted back to 2.8.2
  • comment is added to Remote.Linq\test\Directory.Build.props for a heads-up

ACC

  • root cause is identified
  • mitigation is implemented

Root Cause

This issue arises for ValueTask<> when being resolved via Aqua.TypeSystem.TypeResolver and then does not match method signature since ValueTask<> being defined in more that one assembly:

  • System.Threading.Tasks.Extensions
  • xunit.runner.visualstudio.testadapter
System.Threading.Tasks.ValueTask`1, System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
System.Threading.Tasks.ValueTask`1, xunit.runner.visualstudio.testadapter, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null
@6bee 6bee self-assigned this Dec 20, 2024
@6bee 6bee transferred this issue from 6bee/Remote.Linq Dec 20, 2024
@6bee
Copy link
Owner Author

6bee commented Dec 20, 2024

6bee added a commit that referenced this issue Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant