Open
Description
Repo to use: https://github.com/timheuer/MyCoolApi
Describe the bug
When running in VS, CLI, VSCode, the test output shows:
[21-May-25 11:20:04.136 AM] [Error] Process: D:\source\repos\MyCoolApi\MyCoolApi.Tests\bin\Debug\net9.0\MyCoolApi.Tests.dll, Exception: StreamJsonRpc.RemoteInvocationException: System.TypeLoadException: Could not load type 'Microsoft.Testing.Platform.Extensions.Messages.SerializableNamedArrayStringProperty' from assembly 'Microsoft.Testing.Platform, Version=1.7.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
at Microsoft.Testing.Extensions.VSTestBridge.ObjectModel.ObjectModelConverters.CopyVSTestProperties(IEnumerable`1 testProperties, TestNode testNode, TestCase testCase, Func`2 getPropertyValue, Boolean isTrxEnabled, IClientInfo client)
at Microsoft.Testing.Extensions.VSTestBridge.ObjectModel.ObjectModelConverters.ToTestNode(TestCase testCase, Boolean isTrxEnabled, IClientInfo client, String displayNameFromTestResult) in /_/src/Platform/Microsoft.Testing.Extensions.VSTestBridge/ObjectModel/ObjectModelConverters.cs:line 37
at Microsoft.Testing.Extensions.VSTestBridge.ObjectModel.TestCaseDiscoverySinkAdapter.SendTestCase(TestCase discoveredTest) in /_/src/Platform/Microsoft.Testing.Extensions.VSTestBridge/ObjectModel/TestCaseDiscoverySinkAdapter.cs:line 85
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.UnitTestDiscoverer.SendTestCases(String source, IEnumerable`1 testElements, ITestCaseDiscoverySink discoverySink, IDiscoveryContext discoveryContext, IMessageLogger logger) in /_/src/Adapter/MSTest.TestAdapter/Discovery/UnitTestDiscoverer.cs:line 177
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.UnitTestDiscoverer.DiscoverTestsInSource(String source, IMessageLogger logger, ITestCaseDiscoverySink discoverySink, IDiscoveryContext discoveryContext) in /_/src/Adapter/MSTest.TestAdapter/Discovery/UnitTestDiscoverer.cs:line 84
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.UnitTestDiscoverer.DiscoverTests(IEnumerable`1 sources, IMessageLogger logger, ITestCaseDiscoverySink discoverySink, IDiscoveryContext discoveryContext) in /_/src/Adapter/MSTest.TestAdapter/Discovery/UnitTestDiscoverer.cs:line 41
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.MSTestDiscoverer.DiscoverTests(IEnumerable`1 sources, IDiscoveryContext discoveryContext, IMessageLogger logger, ITestCaseDiscoverySink discoverySink, IConfiguration configuration) in /_/src/Adapter/MSTest.TestAdapter/VSTestAdapter/MSTestDiscoverer.cs:line 47
at Microsoft.VisualStudio.TestTools.UnitTesting.MSTestBridgedTestFramework.SynchronizedDiscoverTestsAsync(VSTestDiscoverTestExecutionRequest request, IMessageBus messageBus, CancellationToken cancellationToken) in /_/src/Adapter/MSTest.TestAdapter/TestingPlatformAdapter/MSTestBridgedTestFramework.cs:line 40
at Microsoft.Testing.Extensions.VSTestBridge.SynchronizedSingleSessionVSTestBridgedTestFramework.<>c__DisplayClass22_0.<<ExecuteRequestAsync>b__0>d.MoveNext() in /_/src/Platform/Microsoft.Testing.Extensions.VSTestBridge/SynchronizedSingleSessionVSTestAndTestAnywhereAdapter.cs:line 160
--- End of stack trace from previous location ---
at Microsoft.Testing.Extensions.VSTestBridge.SynchronizedSingleSessionVSTestBridgedTestFramework.ExecuteRequestWithRequestCountGuardAsync(Func`1 asyncFunc) in /_/src/Platform/Microsoft.Testing.Extensions.VSTestBridge/SynchronizedSingleSessionVSTestAndTestAnywhereAdapter.cs:line 188
at Microsoft.Testing.Extensions.VSTestBridge.VSTestBridgedTestFrameworkBase.ExecuteRequestAsync(ExecuteRequestContext context) in /_/src/Platform/Microsoft.Testing.Extensions.VSTestBridge/VSTestBridgedTestFrameworkBase.cs:line 91
at Microsoft.Testing.Platform.Requests.TestHostTestFrameworkInvoker.ExecuteRequestAsync(ITestFramework testFramework, TestExecutionRequest request, IMessageBus messageBus, CancellationToken cancellationToken) in /_/src/Platform/Microsoft.Testing.Platform/Requests/TestHostTestFrameworkInvoker.cs:line 72
at Microsoft.Testing.Platform.Requests.TestHostTestFrameworkInvoker.ExecuteAsync(ITestFramework testFramework, ClientInfo client, CancellationToken cancellationToken) in /_/src/Platform/Microsoft.Testing.Platform/Requests/TestHostTestFrameworkInvoker.cs:line 61
at Microsoft.Testing.Platform.Hosts.CommonTestHost.ExecuteRequestAsync(ProxyOutputDevice outputDevice, ITestSessionContext testSessionInfo, ServiceProvider serviceProvider, BaseMessageBus baseMessageBus, ITestFramework testFramework, ClientInfo client) in /_/src/Platform/Microsoft.Testing.Platform/Hosts/CommonTestHost.cs:line 136
at Microsoft.Testing.Platform.Hosts.ServerTestHost.ExecuteRequestAsync(RequestArgsBase args, String method, ServiceProvider perRequestServiceProvider) in /_/src/Platform/Microsoft.Testing.Platform/Hosts/ServerTestHost.cs:line 501
at Microsoft.Testing.Platform.Hosts.ServerTestHost.ExecuteRequestAsync(RequestArgsBase args, String method, ServiceProvider perRequestServiceProvider) in /_/src/Platform/Microsoft.Testing.Platform/Hosts/ServerTestHost.cs:line 533
at Microsoft.Testing.Platform.Hosts.ServerTestHost.HandleRequestCoreAsync(RequestMessage message, RpcInvocationState rpcInvocationState) in /_/src/Platform/Microsoft.Testing.Platform/Hosts/ServerTestHost.cs:line 422
at Microsoft.Testing.Platform.Hosts.ServerTestHost.HandleRequestAsync(RequestMessage request, CancellationToken serverClosing) in /_/src/Platform/Microsoft.Testing.Platform/Hosts/ServerTestHost.cs:line 333
at StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult](RequestId id, String targetName, IReadOnlyList`1 arguments, IReadOnlyList`1 positionalArgumentDeclaredTypes, IReadOnlyDictionary`2 namedArgumentDeclaredTypes, CancellationToken cancellationToken, Boolean isParameterObject)
at Microsoft.VisualStudio.TestWindow.Internal.RemoteAgent.TestingPlatform.RpcClient.DiscoverTestsAsync(Guid runId, CancellationToken cancellationToken)
at Microsoft.VisualStudio.TestWindow.Internal.RemoteAgent.TestingPlatform.Clients.TestingPlatformClient.<>c__DisplayClass20_0.<<DiscoverTestsAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.VisualStudio.Threading.ThreadingTools.WithCancellationSlow[T](Task`1 task, CancellationToken cancellationToken)
at Microsoft.VisualStudio.TestWindow.Internal.RemoteAgent.TestingPlatform.Clients.TestingPlatformClient.ExecuteRpcCallAsync[T](Func`1 rpcFunction, CancellationToken cancellationToken)
If I change the TRX package to 1.6.3 it succeeds and tests run as expected.
Steps To Reproduce
Run the tests and then look at error/outputs.
Change to 1.6.3 package and re-run the tests