I have a VS2010 TFS Build server configured with a build definition set for continuous configuration.
For my BizTalk 2010 solution I have 200+ tests. These tests all run ok on my dev box but on the build server, for the tests dealing with flat-files, I get the error “Unable to find Microsoft.BizTalk.Tom.resources”. My guess is that this is a resource file contained within the assembly Microsoft.BizTalk.TOM.dll Although I’ve used reflector and can’t see the resources.
It turns out Microsoft.BizTalk.TOM.dll is a .Net 2 dll that is installed with BizTalk into the following folder:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies
I’ve checked the build server and confirmed that this assembly is present, in the above folder.
I have tried the following, based on 3 different blog postings around the same issue:
- Included a reference to dll and set copylocal to true
- Added the assembly to the .Net 2 GAC
- Added the assembly to the “Additional files to deploy” list from the Test Settings dialog / Deployment tab
- Added the assembly to the “Folders to use when tests are run” list from the Test Settings dialog / Unit Test tab
After the tests fail I check the \TestResults\Out folder. I can see that the Microsoft.BizTalk.TOM.dll has been copied here.
When I check the equivalent folder on the dev server I don’t see any files that aren’t present on the build server.
Any ideas what I can try next please?
I found a copy of the Microsoft.BizTalk.Tom.dll in the folder: C:\Users\tfs_service\AppData\Local\assembly\dl3\randomname\
After researching, it turns out this is where “Shadow Copies”of assemblies are stored: what is cache AppData\Local\assembly\dl3?
I would like it know why shadow copies are being made and how I can prevent it, I guess in my case the app domain is MsTest?
I deleted the shadow copies and uninstalled from the GAC, so that I was left with copies in only the following folders:
10.0\Common7\IDE\PublicAssemblies
After deleting the shadow copies and and restarting the server, the tests now run successfully.