0

I am trying to build my MVC projects using msbuild from Jenkin server but its failed because of following error.

error CS0246: The type or namespace name 'TestMethod' could not be found (are you missing a using directive or an assembly reference?) [D:\Jenkins_home\workspace\resource-allocation-code-cleanup\Brain.Tests\Brain.Tests.csproj]

This is because of following namespace. How can avail this namespace for VS 2019 Builder tools.

Microsoft.VisualStudio.TestTools.UnitTesting;

In Local, the same command is working properly. Only difference is I have installed VS 2019 Build tools in Jenkin server and VS 2019 Enterprise in local machine.

Vignesh Kumar A
  • 26,868
  • 11
  • 59
  • 105
  • Isn't MSTest part of Visual Studio (als see the namespace name `Microsoft.VisualStudio`)? I.e. you either need a VS installation or a NuGET package, see also https://stackoverflow.com/questions/13602508/where-to-find-microsoft-visualstudio-testtools-unittesting-missing-dll – stijn Sep 15 '21 at 13:00

0 Answers0