Repository navigation
Description
Bug report checklist
- I've searched existing issues to ensure this isn't a duplicate
- I've read the documentation and this isn't expected behavior
- I'm using the latest version of TUnit
Description
I have a test project that was using TUnit 1.81.16 and it was working just fine.
After updating to TUnit 1.83.x I have this behavior:
- When running tests from within Visual Studio the tests also work just fine.
- When running "dotnet test" in terminal I get a System.IO.FileNotFoundException 'Microsoft.Bcl.AsyncInterfaces, Version=9.0.0.0'
Expected Behavior
To compile and pass tests.
Actual Behavior
A FileNotFoundException 'Microsoft.Bcl.AsyncInterfaces, Version=9.0.0.0' is thrown.
Steps to Reproduce
- clone vpenades/codesugar
- update TUnit to 1.83.x
- dotnet test
TUnit Version
1.83.0
.NET Version
NET 10.0
Operating System
Windows
IDE / Test Runner
dotnet CLI (dotnet test / dotnet run)
Error Output / Stack Trace
Error output: Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Bcl.AsyncInterfaces, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. El sistema no puede encontrar el archivo especificado.
File name: 'Microsoft.Bcl.AsyncInterfaces, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
at TUnit.Engine.Framework.TUnitTestFramework..ctor(IExtension extension, IServiceProvider frameworkServiceProvider, ITestFrameworkCapabilities capabilities)
at TUnit.Engine.Extensions.TestApplicationBuilderExtensions.<>c__DisplayClass1_0.<AddTUnit>b__1(ITestFrameworkCapabilities capabilities, IServiceProvider serviceProvider)
at Microsoft.Testing.Platform.Hosts.TestHostBuilder.BuildTestFrameworkCoreAsync(TestFrameworkBuilderData testFrameworkBuilderData)
at Microsoft.Testing.Platform.Hosts.TestHostBuilder.BuildTestFrameworkAsync(TestFrameworkBuilderData testFrameworkBuilderData)
at Microsoft.Testing.Platform.Hosts.ConsoleTestHost.InternalRunAsync(CancellationToken cancellationToken, List`1 _)
at Microsoft.Testing.Platform.Hosts.CommonHost.RunTestAppAsync(IPlatformOpenTelemetryService platformOTelService, CancellationToken testApplicationCancellationToken, List`1 alreadyDisposed)
at Microsoft.Testing.Platform.Hosts.CommonHost.RunAsync()
at Microsoft.Testing.Platform.Hosts.CommonHost.RunAsync()
at Microsoft.Testing.Platform.Hosts.CommonHost.RunAsync()
at Microsoft.Testing.Platform.Builder.TestApplication.RunAsync()
at XXXXXXXX.MicrosoftTestingPlatformApplication.RunAsync(String[] args)
at XXXXXXXX.MicrosoftTestingPlatformEntryPoint.<Main>(String[] args)Additional Context
AOT trimming is enabled.
IDE-Specific Issue?
- I've confirmed this issue occurs when running via
dotnet testordotnet run, not just in my IDE
Activity
vbreuss commentedon Nov 12, 2026
I have the same issue in my CI-Build pipeline: https://github.com/Testably/Testably.Abstractions/actions/runs/43123181518/job/130868538888?pr=1210
Maybe this helps reproducing it...
thomhurst commentedon Nov 12, 2026
Hey @vbreuss and @vpenades - do you both have net8.0 or net9.0 targets still? TUnit dropped targeting those specifically since they're now end of life
vpenades commentedon Nov 12, 2026
yes, I still target net 8.0
I am aware that 8.0 is at its EOL, but I usually extend its support for a little longer, since not everybody updates at the same pace as microsoft wishes.
vbreuss commentedon Nov 12, 2026
Yes, @thomhurst. I am implementing a library that multi-targets many frameworks and I don't know what frameworks users still use, so I don't want to drop support for older frameworks immediately when they go out-of-support from microsoft. Eventually I will drop such support after maybe a year or so in a major update (still keeping netstandard2.0 as a fallback).
What I didn't expect was for TUnit to let my builds fail due to this in a minor update!
thomhurst commentedon Nov 12, 2026
I'll re-add support for now but I don't want to support an EOL product for like another year. Each new target I add makes the build pipeline quite a bit slower . I'll restore now and then do a major version bump for that 😄
fix: restore the net8.0 target for the packaged libraries (#7739) (#7743
+semver:minor - fix: restore net8.0/net9.0 support on the netstandard…