TFS 2018 - VsTest Platform Installer - MSTest - Warning: No test is available in...

I am able to successful runs MSTest unit tests in Visual Studio 2017 but it would not run on the TFS 2018 server (or TFS 2015 before I upgraded).

While setting up TFS 2018 to run unit tests I was getting the following warnings.

Warning: [MSTest][Discovery][C:\Agent\_work\2\s\[......]
Warning: No test is available in C:\Agent\_work\2\s\[......]

Information: Additionally, you can try specifying '/UseVsixExtensions' command if the test discoverer & executor is installed on the machine as vsix extensions and your installation supports vsix extensions.

##[warning]No results found to publish.
##[section]Finishing: VsTest - testAssemblies


By default the "Search folder" was set to $(System.DefaultWorkingDirectory) that path was looking at c:\agent\_work\2\s\MyProject.Tests\obj\Release\MyProject.Tests.dll but that folder did not have the following DLLs.   


Changing the  "Search folder" to $(Build.StagingDirectory) corrected the issue and the test ran successfully.

Here are are the tasks in the build.

Here is where the value for the path had to be updated.


Generic Repository Pattern in ASP.NET Core

Here are a couple of helpful examples on building a C# .NET Core Generic Repo.

In these patterns you must pass the model (or table) to the repo.  After working with this pattern and patterns that define the model in the repo, I prefer the latter.  This way you have intellense in the repo to list all the models. 

Sample 1: C# Core Repo code on MSDN by Sandeep Shekhawat 

Sample 2: A Truly Generic Repository by Chris Pratt (not the guy from Guardians)