VS Test Explorer requests older version of Microsoft.Extensions.DependencyInjection.Abstractions than is installed

50 views Asked by At

I've got a Test project that has the Microsoft.Extensions.DependencyInjection.Abstractions NuGet package with version 3.1.9 which is the minimum requirement version of the CSLA.NET NuGet package that I've also got installed. For some reason when I run a test in the Test Explorer it looks for an older version of Microsoft.Extensions.DependencyInjection.Abstractions (v 3.1.0). The project is question is using .NET Framework 4.8.1. I'm a bit puzzled as to what could be the issue.

  • I tried to upgrade the installed version to v3.1.32 but then the test seems to look for version 3.1.9.

  • I've tried to remove the direct reference to Microsoft.Extensions.DependencyInjection.Abstractions in the test project (it's used in the project being tested), but with the same result.

  • I've tried to do Clean + Rebuild.

  • I've tried to delete the bin and obj folders in the test project.

  • I've upgraded to the latest VS 2022 build (17.5.3) with the same result.

Looking at the bin\Debug folder I can see the correct version as installed in the project.

1

There are 1 answers

0
Oskar Fjeld On

This seems related to the package CSLA.NET that I'm using and the version 5.5.x. Found the "solution" in their issues on GitHub. The issue The "solution" is to add binding redirects to app.config.