The following error pops up every now and then:
C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\TeamTest\Microsoft.TeamTest.targets(14,5): error : API restriction: The assembly 'file:///C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll' has already loaded from a different location. It cannot be loaded from a new location within the same appdomain.
How do I get rid of it?
If you are getting this error when it tries to run the tests on your TFS Build Server, then you may just have to change the pattern that the TFS build definition uses to locate test assemblies. This post describes the problem and solution. Basically TFS is finding the same test assembly in two different folders and tries to include it twice. To fix this:
By removing the folder from the match pattern (i.e. the \) it will only include the test assembly once, even if it finds it in two different folders.
Change:
to: