The GUID solutions did not work for me in VS 2022. Turns out all I needed to do was edit the project file and add the IsTestProject value:
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{553487BF-FC0B-4FC5-B25B-C8C89A13F4ED}</ProjectGuid>
<IsTestProject>true</IsTestProject>
<OutputType>Library</OutputType>
.
.
.
</PropertyGroup>