I ran into the following problem when I was trying to build using the TFS build definition.
When executing assembly for assembly, the agent logs the following errors:
Error CS0234: The type or name of the VisualStudio namespace does not exist in the Microsoft namespace (do you miss the assembly reference?)
Error CS0246: the type name or namespace name 'TestInitializeAttribute' could not be found (do you miss the using directive or assembly references?)
Error CS0246: The type or name of the TestCleanupAttribute namespace could not be found (are you missing the using directive or assembly references?)
Error CS0246: The type or name of the TestCleanup namespace could not be found (are you missing the using directive or assembly references?)
Error CS0246: The type or name of the TestMethodAttribute namespace could not be found (are you missing the using directive or assembly references?)
So, I understand the message in such a way that buildAgent cannot find the following .dll
Microsoft.VisualStudio.TestTools.UnitTesting;
I installed Visual Studio 2017 RC and Visual Studio 2017 Build Tools on a server that runs TFS and Buildagents.
I also installed .net 4.6.1 on this machine.
This accepted answer is not a solution for me.
There must be some solution that does not include in order to copy this dll to the git trunk and reference it from there.
Update
I can locally build the solution using Visual Studio 2017 RC on this machine. But the build agent still causes the same errors.
source share