You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am migrating to .net9 and I got this exception when running my test assemblies built with .net9. I am using version nunit3-console 3.19.2 (net8.0)
Unhandled exception. System.MissingMethodException: Method not found: 'System.TimeSpan System.TimeSpan.FromMilliseconds(Int64, Int64)'.
at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
For other ppl struggling with that - I was able to workaround the error by editing nunit3-console.runtimeconfig.json and manually setting tfm and version to net9.0 and 9.0.0
This make nunit3-console.exe to use .net9 to run the tests. I believe this happens because there were new overloads of TimeSpan added in .net9 and when the code make use of them, this happens.
The text was updated successfully, but these errors were encountered:
Thanks for your issue report and sharing your work around. The 3.19 console runner does not contain a .NET 9 agent and so you're quite right that .NET 9-specific overloads like this will unfortunately error. A change has just recently merged to fix this in #1602 by adding a new .NET 9 runner in the upcoming 3.20 release.
Thanks for testing that out @ekalchev . Glad to hear the 3.20 release will fix this for you. We're just finalizing the release now, we aim to release within the coming weeks
I am migrating to .net9 and I got this exception when running my test assemblies built with .net9. I am using version nunit3-console 3.19.2 (net8.0)
For other ppl struggling with that - I was able to workaround the error by editing nunit3-console.runtimeconfig.json and manually setting tfm and version to
net9.0
and9.0.0
This make nunit3-console.exe to use .net9 to run the tests. I believe this happens because there were new overloads of TimeSpan added in .net9 and when the code make use of them, this happens.
The text was updated successfully, but these errors were encountered: