Team Build: Could not find file ‘Microsoft.BizTalk.TOM.resources’ when running Biztalk Unit tests
I have set up Team Build to build a solution that contains Biztalk and C# projects. The environment I used was Biztalk 2010 and TFS 2010. When running the unit tests related to Biztalk Schemas or Pipelines I used to receive the following exception:
Could not find file ‘Microsoft.BizTalk.TOM.resources’
I know that I have a reference to the Microsoft.BizTalk.TOM.dll assembly in the Biztalk project and the unit test project. Unit tests were running on Visual studio 2010 but failing on team build.
I figure out that for some reason, Team Build decides not to copy the Microsoft.BizTalk.TOM.dll assembly to the binaries folder of that unit test project although I have the “copy local” property set to true. To force deploying the assembly to the unit test folder, make sure that you add it to the testsetting deploy option. Make sure that Biztalk server is installed on the Teambuild machine and the path for the assembly is valid on the Teambuild server. Otherwise you need to checkin the assembly into source control and reference the assembly in source control.
- Open the testsettings file used for the team build definition
- Click Deployment from the list on the left
- Click Add Files