Search code examples
visual-studiomsbuildbiztalkbiztalk-2013r2btdf

BizTalk deployment framework throws MSBuild errors MSB4061


I am having some problems with the BizTalk Development Framework.

My BizTalk project builds completely fine. But when using the 'Deploy BizTalk Solution' option from Visual Studio MSBuild is not happy. I am deploying to a server that is on our internal network, but not on the same box as my development machine.

These are the errors (it seems to be complaining about a bunch of missing assemblies, but my setup is a plain BizTalk 2013 R2 development tools install and the deployment framework does it need the full server installing on the dev machine?):

DeployFileAdapterPhysicalPaths: Configuring FILE adapter physical paths from binding file PortBindings.xml... Processing FILE adapter physical paths (Send)... Processing FILE adapter physical paths (Receive)...

C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1986,5): error MSB4061: The "TerminateServiceInstances" task could not be instantiated from "C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.Tasks.BizTalk.dll". [C:\Users\asmiddle\Source\Workspaces\NYCC.LSI\Biztalk.Deployment\Biztalk.Deployment.btdfproj]

C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1986,5): error MSB4061: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.BizTalk.Operations, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
[C:\Users\asmiddle\Source\Workspaces\NYCC.LSI\Biztalk.Deployment\Biztalk.Deployment.btdfproj] C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1986,5): error MSB4061: File name: 'Microsoft.BizTalk.Operations, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' [C:\Users\asmiddle\Source\Workspaces\NYCC.LSI\Biztalk.Deployment\Biztalk.Deployment.btdfproj] C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1986,5): error MSB4061: at DeploymentFramework.BuildTasks.TerminateServiceInstances..ctor() [C:\Users\asmiddle\Source\Workspaces\NYCC.LSI\Biztalk.Deployment\Biztalk.Deployment.btdfproj]

C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1986,5): error MSB4061: [C:\Users\asmiddle\Source\Workspaces\NYCC.LSI\Biztalk.Deployment\Biztalk.Deployment.btdfproj]

C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1986,5): error MSB4061: WRN: Assembly binding logging is turned OFF.
[C:\Users\asmiddle\Source\Workspaces\NYCC.LSI\Biztalk.Deployment\Biztalk.Deployment.btdfproj]

C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1986,5): error MSB4061: To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.

[C:\Users\asmiddle\Source\Workspaces\NYCC.LSI\Biztalk.Deployment\Biztalk.Deployment.btdfproj] C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1986,5): error MSB4061: Note: There is some performance penalty associated with assembly bind failure logging. [C:\Users\asmiddle\Source\Workspaces\NYCC.LSI\Biztalk.Deployment\Biztalk.Deployment.btdfproj]

C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1986,5): error MSB4061: To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. [C:\Users\asmiddle\Source\Workspaces\NYCC.LSI\Biztalk.Deployment\Biztalk.Deployment.btdfproj]

C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1986,5): error MSB4061: [C:\Users\asmiddle\Source\Workspaces\NYCC.LSI\Biztalk.Deployment\Biztalk.Deployment.btdfproj]

C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1986,5): error MSB4060: The "TerminateServiceInstances" task has been declared or used incorrectly, or failed during construction. Check the spelling of the task name and the assembly name. [C:\Users\asmiddle\Source\Workspaces\NYCC.LSI\Biztalk.Deployment\Biztalk.Deployment.btdfproj] Done Building Project "C:\Users\asmiddle\Source\Workspaces\NYCC.LSI\Biztalk.Deployment\Biztalk.Deployment.btdfproj" (Deploy target(s)) -- FAILED.

Build FAILED.


Solution

  • In addition to Zee's correct point, this is failing because BizTalk is not installed on your local machine. You cannot deploy from Visual Studio to a remote machine for BizTalk, even using BTDF. It's trying to deploy locally and failing because it can't find some of the BizTalk assemblies that BTDF relies on for deployments.

    If you want to deploy remotely, you should use BTDF to build an MSI and run the MSI on that target server(s).