Posted by: rusteddev | June 15, 2010

Build BizTalk 2010 Beta project with TFS 2010 : use x86 version of msbuild

Today I tried to make my BizTalk 2010 solutions Build automatically with tfs 2010 and it works !

But it wasn’t easy anyway. I got plenty of errors when compiling like these :

  1. In Schema projects : CSC: Source file ‘C:\Builds\3\BusV4\Build_Process_\xxxxxx.xsd.cs’ could not be found
  2. In transform projects (Maps) : 
C:\Program Files (x86)\MSBuild\Microsoft\BizTalk\BizTalkCommon.targets (115): The “MapperCompiler” task failed unexpectedly. System.IO.FileNotFoundException: Could not load file or assembly ‘Microsoft.BizTalk.TOM, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35′ or one of its dependencies. The system cannot find the file specified. File name: ‘Microsoft.BizTalk.TOM, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ —> System.IO.FileNotFoundException: Could not load file or assembly ‘file:///C:\Program Files\Common Files\Microsoft BizTalk\Microsoft.BizTalk.Tom.dll’ or one of its dependencies.

 

C:\Program Files (x86)\MSBuild\Microsoft\BizTalk\BizTalkCommon.targets (115): The “MapperCompiler” task failed unexpectedly. System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {AA9DB8EC-0E8C-4188-B070-2C763386B9FB} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)). at Microsoft.VisualStudio.BizTalkProject.Compiler.MapCompiler.Compile(BizTalkBuildSnapshot buildSnapshot, IEnumerable`1 mapFilesToCompile, IEnumerable`1 schemaFiles, List`1& generatedCodeFiles, List`1& xsltFiles) at Microsoft.VisualStudio.BizTalkProject.BuildTasks.MapperCompiler.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult)

 

I googled about these individual problems. Found no real answers (here & here). Workarounds (like adding .cs files to tfs source repository for n°1 or gac external needed dlls) aren’t satisfying because other errors came by afterwards …..

After a while, I figured out  that I wasn’t looking at the real problem. All these errors are consequences of using x64 version of MSBUILD :-). And of course BizTalk projects aren’t good with x64 build tasks. So changing the MSBuild platform option in TFS build definition immediatly solved the issue ! See below :

 

And by the way believe me : there is no Visual Studio 2010 or BizTalk SDK installed on that platform. These component are not necessary to build BizTalk projects (SDK needed for tests apparently… see  here …. i didn’t go that far for the moment). To build I only installed :

 * Biztalk Server 2010 Beta (including Project Build Component)

* TFS 2010 Build Services (included in tfs2010 install cd)


Responses

  1. […] – https://rusteddev.wordpress.com/2010/06/15/build-biztalk-2010-beta-project-with-tfs-2010-use-x86-vers… […]

  2. […] – https://rusteddev.wordpress.com/2010/06/15/build-biztalk-2010-beta-project-with-tfs-2010-use-x86-vers… […]

  3. THANK YOU!!!!!!THANK YOU!!!!!!THANK YOU!!!!!!THANK YOU!!!!!!

  4. Thanks a tonne !!

  5. THANK YOU SOOOO MUCH!!!! Works like a charm!


Leave a comment

Categories