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
The new source generator does not generate any code that is hit by any tests in A.Tests and works fine when targeting net9.0 (as one would expect, since from the A.Tests perspective, nothing really changed), but when targeting net6.0 we suddenly run into the following exception:
Unhandledexception. System.MissingMethodException: Method not found: 'Void Microsoft.Testing.Platform.Extensions.Messages.TestNode.set_DisplayName(System.String)'.at TUnit.Engine.Framework.TUnitTestFramework.ExecuteRequestAsync(ExecuteRequestContextcontext)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine&stateMachine)
at TUnit.Engine.Framework.TUnitTestFramework.ExecuteRequestAsync(ExecuteRequestContextcontext)
at Microsoft.Testing.Platform.Requests.TestHostTestFrameworkInvoker.ExecuteRequestAsync(ITestFrameworktestFramework,TestExecutionRequestrequest,IMessageBusmessageBus,CancellationTokencancellationToken)in/_/src/Platform/Microsoft.Testing.Platform/Requests/TestHostTestFrameworkInvoker.cs:line 73
at Microsoft.Testing.Platform.Requests.TestHostTestFrameworkInvoker.ExecuteAsync(ITestFrameworktestFramework,ClientInfoclient,CancellationTokencancellationToken)in/_/src/Platform/Microsoft.Testing.Platform/Requests/TestHostTestFrameworkInvoker.cs:line 62
at Microsoft.Testing.Platform.Hosts.CommonTestHost.ExecuteRequestAsync(IPlatformOutputDeviceoutputDevice,ITestSessionContexttestSessionInfo,ServiceProviderserviceProvider,BaseMessageBusbaseMessageBus,ITestFrameworktestFramework,ClientInfoclient)in/_/src/Platform/Microsoft.Testing.Platform/Hosts/CommonTestHost.cs:line 111
at Microsoft.Testing.Platform.Hosts.ConsoleTestHost.InternalRunAsync()in/_/src/Platform/Microsoft.Testing.Platform/Hosts/ConsoleTestHost.cs:line84
at Microsoft.Testing.Platform.Hosts.ConsoleTestHost.InternalRunAsync()in/_/src/Platform/Microsoft.Testing.Platform/Hosts/ConsoleTestHost.cs:line116
at Microsoft.Testing.Platform.Hosts.CommonTestHost.RunTestAppAsync(CancellationToken testApplicationCancellationToken)in/_/src/Platform/Microsoft.Testing.Platform/Hosts/CommonTestHost.cs:line85
at Microsoft.Testing.Platform.Hosts.CommonTestHost.RunAsync()in/_/src/Platform/Microsoft.Testing.Platform/Hosts/CommonTestHost.cs:line33
at Microsoft.Testing.Platform.Hosts.CommonTestHost.RunAsync()in/_/src/Platform/Microsoft.Testing.Platform/Hosts/CommonTestHost.cs:line56
at Microsoft.Testing.Platform.Builder.TestApplication.RunAsync()in/_/src/Platform/Microsoft.Testing.Platform/Builder/TestApplication.cs:line240
I did some digging in the code of TestNode.cs and TUnitTestFramework, but didn't find anything strange. The tests output that the detected testing platform version is 1.4.3, which defines the init prop DisplayName on TestNode, which should result in a hidden set_DisplayName(string) method, so I don't really understand how it can not find the method (or why this was not an issue previously or when targeting net9.0).
The text was updated successfully, but these errors were encountered:
Previous project setup where
->
denotes a dependency:The tests worked perfectly fine when
A.Tests
targeted bothnet6.0
andnet9.0
.Now I introduced another source generator:
The new source generator does not generate any code that is hit by any tests in
A.Tests
and works fine when targetingnet9.0
(as one would expect, since from theA.Tests
perspective, nothing really changed), but when targetingnet6.0
we suddenly run into the following exception:I did some digging in the code of TestNode.cs and TUnitTestFramework, but didn't find anything strange. The tests output that the detected testing platform version is
1.4.3
, which defines theinit
propDisplayName
onTestNode
, which should result in a hiddenset_DisplayName(string)
method, so I don't really understand how it can not find the method (or why this was not an issue previously or when targetingnet9.0
).The text was updated successfully, but these errors were encountered: