You can check if you are using the correct MSBuild. In my case, when I receive messages such as:
'TestMethod' could not be found
We had to make sure that we have the correct version of MSBuild.
C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe your_solution.sln /t:rebuild /t:Rebuild /clp:ErrorsOnly
It also fixes some problems with Microsoft.VisualStudio.QualityTools.UnitTestFramework .dll
Junior M
source share