We're able to run unit tests & publish the code coverage to sonarqube in Azure Devops build pipeline till last month. Now we're getting the below error in Visual Studio Test task for .NET code.
Test run will use DLL(s) built for framework .NETFramework,Version=v4.0 and platform X86. Following DLL(s) do not match framework/platform settings. MedicareActuarial.Api.Tests.dll is built for Framework 3.1 and Platform AnyCPU. Microsoft.AspNetCore.TestHost.dll is built for Framework 3.1 and Platform AnyCPU. Microsoft.TestPlatform.CommunicationUtilities.dll is built for Framework 1.4 and Platform AnyCPU. Microsoft.TestPlatform.CoreUtilities.dll is built for Framework 1.4 and Platform AnyCPU. Microsoft.TestPlatform.CrossPlatEngine.dll is built for Framework 1.4 and Platform AnyCPU. Microsoft.TestPlatform.PlatformAbstractions.dll is built for Framework 1.0 and Platform AnyCPU. Microsoft.VisualStudio.TestPlatform.Common.dll is built for Framework 1.4 and Platform AnyCPU. Microsoft.VisualStudio.TestPlatform.ObjectModel.dll is built for Framework 1.4and Platform AnyCPU. testhost.dll is built for Framework 1.0 and Platform AnyCPU.
We've tried options Override test run parameters/other console options with the above specific .dlls in test files. but didn't work.