0

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.

Daniel Mann
  • 57,011
  • 13
  • 100
  • 120

1 Answers1

0

The same issues happen on previous version of Visual Studio 16.2. It has fixed on Visual Studio 16.2 here

If you are facing the same issue Try to use the latest Visual Studio version https://visualstudio.microsoft.com/downloads/

People who are faced similar issue with solution. Check here for additional information

Delliganesh Sevanesan
  • 4,146
  • 1
  • 5
  • 15