reportportal / agent-net-vstest

Logger extension for VsTest
Apache License 2.0
8 stars 10 forks source link

Request to update to net8 and support Test Explorer runs in VS2022 #68

Closed VladimirNilov closed 2 months ago

VladimirNilov commented 2 months ago

Hi, I'd like to request a support ticket to make the lib work with .net8 and Visual Studio 2022 Test Explorer if it's possible

Dotnet test is good to have, but vstest runner is a default runner for Visual Studio, plus it has some benefits for Azure DevOps tasks. Moreover, I'm not sure whether it can be a problem or not, but inside sources it's still using old
PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="15.5.0"

Current behavior - the same as in the opened bug: https://github.com/reportportal/agent-net-vstest/issues/66:

Error] System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileLoadException: Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) at ReportPortal.VSTest.TestLogger.ReportPortalLogger..ctor()

Moreover, I've tried to make the updates myself, bug got into Failed to load extensions from file for the ReportPortal.VSTest.TestLogger.dll

Thank you!

VladimirNilov commented 2 months ago

as it was mentioned above NET Framework cannot load .NET assemblies natively, which means that the extension doesn't support running .net8.0 tests in the Test Explorer and vstest.console.exe from the box. The limitation is on the vstest side (it would be good to mention it in the readme as we cannot use the extension with the vstest.console.exe and Test Explorer) also, it's not only about net8.0 but related to the client-dotnet that needs to load System.Text.Json with dependencies to .Net 6.0 libs the last time it was working was probably for client 3.0.6, when the client had usage instead of System.Text.Json the System.Runtime.Serialization using

nvborisenko commented 2 months ago

@VladimirNilov will you be able to raise an issue in vstest repo?