We run the TeamCity 8.1.4 builder with VS2013 installed on the machine.
I recently introduced tests that rely on the Microsoft Fakes Framework. Because of this, I had to add some links to the new Fake assemblies and the Microsoft.VisualStudio.TestTools.UnitTesting assembly. All this works fine on my local development machine.
Now, when I try to create a solution on the TeamCity server, the following errors occur:
SomeDirectory \ Processors \ ProcessorTests.cs (3, 27): error CS0234: the type or name of the namespace "Fakes" does not exist in the namespace 'SomeDirectory.Database' (do you miss the assembly reference?)
SomeDirectory \ Processors \ ProcessorTests.cs (7, 66): error CS0234: the type or name of the namespace "Fakes" does not exist in the namespace 'SomeDirectory.Service.Processor.Report.Processors' (do you miss the assembly reference?)
SomeDirectory \ Processors \ ProcessorTests.cs (9, 17): error CS0234: type or namespace name "QualityTools" does not exist in the namespace "Microsoft" (do you miss the assembly reference?)
I understand the first two errors somewhat, because I did not complete the Fake builds in SVN, so they cannot be found. I also do not want to commit these files, because the build server must generate them by itself. BuildAction files installed on Fakes .
My guess is that the first two errors have their origin, met with the third error. As far as I know, the QualityTools namespace is in the Microsoft.VisualStudio.TestTools.UnitTesting assembly.
I tried to fix this with a few settings. The initial build step that I configured was:
Type Runner = Visual Studio (sln)
Visual Studio = Microsoft Visual
Studio 2013
I changed this to:
Runner Type = MSBuild
MSBuild version = Microsoft Build Tools 2013
MSBuild ToolsVersion = 12.0
I also tried MSBuild .NET 4.5 with ToolsVersion 4.0 .
All of these settings lead to the same errors.
As you can understand, the solution will not compile at the moment, so I can’t say for sure whether the tests will pass or not. I already found a message on how to set up a test step with TeamCity, but this is the next step.
Has anyone figured out how to fix these issues with TeamCity and VS2013?
Edit
I already checked if the TestTools.UnitTesting assembly exists on the file system. This assembly is present, so this should not be a problem.
Edit 2
Unfortunately, I read the third error message incorrectly. I should look for the Microsoft.QualityTools.Testing.Fakes assembly because it says it cannot resolve the QualityTools namespace. After checking the path of Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PublicAssemblies I can confirm that the dll is missing from the file system.
I copied it manually to the builds server and see what happens next.
Edit 3
After copying the Microsoft.QualityTools.Testing.Fakes assembly to the assembly server, the solution compiles like a charm. However now i get a friend
Failed to resolve profiling path from COR_PROFILER_PATH and COR_PROFILER environment variables.
I have seen this before on the TFS2012 server. This meant that he was unable to process the gaskets, and we had to upgrade to TFS2013.
I just logged in on the builds server and saw that the version of VS2013 had expired. Perhaps the reason is that it is not working properly. The installed installation of VS2012 is version 11.0.50727.1, so update 3 is not installed. I will discuss with my colleagues if this can be updated. Hope this solves the problems that I encounter with fakes and gaskets.
Solved Apparently, someone thought it was fun to install VS2013 Professional on the buildserver server. Therefore, fakes could not work, since this is a Premium feature. The Premium version is installed, and now everything works like a charm.