Tests are not updated in Visual Studio Test Explorer

194 Views Asked by At

Test output source within the Output tool window displays

Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Could not find testhost

and the list of tests in the Test Explorer tool window froze and do not refresh on any changes (build/rebuild), deleting .vs folder.

2

There are 2 best solutions below

0
XperiAndri On

In my case, the issue was caused by applying a version wildcard in central package version management in Packages.props

<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.6.*" />

which caused the version not to be resolved (17.6.* appeared in Dependencies\Packages\Microsoft.NET.Test.Sdk (17.6.*) of a project)

so changing to

<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.6.0" />

fixed the issue

0
yannis_t On

I had the same issue in Visual Studio 2022 Professional (Version 17.6.0). Installing Microsoft.NET.Test.Sdk package solved this.