Deploy error

Topics: Getting Started/Beginner
May 29, 2013 at 9:48 AM
Hi,

I try to deploy a BizTalk solution, but I get the next error:

Assembly "BP.BuildTemplate.Orchestrations, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ba9a7374f79dc1ef" references the following assemblies that must be deployed before deploying this assembly:
Assembly "BP.BuildTemplate.Maps, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ba9a7374f79dc1ef"

It seems that the Maps has not been deployed, because I haven't used the standard naming "Transforms". Here are my settings in ".btdfproj":
    <!-- Set following properties to true or false to include various pieces of a BizTalk deployment. -->
    <IncludeSchemas>true</IncludeSchemas>
    <IncludeOrchestrations>true</IncludeOrchestrations>
    <IncludeTransforms>false</IncludeTransforms>
    <IncludePipelines>true</IncludePipelines>
    <IncludeComponents>false</IncludeComponents>
    <IncludePipelineComponents>false</IncludePipelineComponents>
    <IncludeCustomFunctoids>false</IncludeCustomFunctoids>
    <IncludeVocabAndRules>false</IncludeVocabAndRules>
    <IncludeVirtualDirectories>false</IncludeVirtualDirectories>
    <IncludeMessagingBindings>true</IncludeMessagingBindings>
    <IncludeDeploymentTest>false</IncludeDeploymentTest>
    <Includelog4net>false</Includelog4net>
    <IncludeSSO>false</IncludeSSO>
    <IncludeBAM>false</IncludeBAM>

    <!-- The Deployment Framework defaults to Transforms but we use Maps -->
    <Transforms>BP.BuildTemplate.Maps</Transforms>
    <!-- One or more transform assemblies -->
    <ItemGroup>
        <Transforms Include="$(ProjectName).Maps.dll">
            <LocationPath>..\$(ProjectName).Maps\bin\$(Configuration)</LocationPath>
        </Transforms>
        <Components Include="$(ProjectName).BusinessComponents.dll">
            <LocationPath>..\$(ProjectName).BusinessComponents\bin\$(Configuration)</LocationPath>
        </Components>
    </ItemGroup>
Can you help?

Thanks,
Tuan
Coordinator
May 29, 2013 at 1:45 PM
Hi Tuan,

Change <IncludeTransforms>false</IncludeTransforms> to true. Also, unless you need it for something custom that you are doing, you can remove <Transforms>BP.BuildTemplate.Maps</Transforms>.

Thanks,
Tom
May 29, 2013 at 2:24 PM
Thanks for your reply Tom.

I have updated like you suggest, but I get the next error:
"C:\BizTalkDev\BP.BuildTemplate\BP.BuildTemplate.Deployment\BP.BuildTemplate.Deployment.btdfproj" (Deploy target) (1) ->
(UndeployOrchestrations target) -> 
  C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1263,5): error MSB4018: The "GenerateAssemblyNamesItemGroup" task failed unexpectedly.
C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1263,5): error MSB4018: System.IO.FileNotFoundException: Could not load file or assembly 'C:\BizTalkDev\BP.BuildTemplate\BP.BuildTemplate.Orchestrations\bin\Release\BP.BuildTemplate.Orchestrations.dll' or one of its dependencies. The system cannot find the file specified.
C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1263,5): error MSB4018: File name: 'C:\BizTalkDev\BP.BuildTemplate\BP.BuildTemplate.Orchestrations\bin\Release\BP.BuildTemplate.Orchestrations.dll'
C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1263,5): error MSB4018:    at System.Reflection.AssemblyName.nGetFileInformation(String s)
C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1263,5): error MSB4018:    at System.Reflection.AssemblyName.GetAssemblyName(String assemblyFile)
C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1263,5): error MSB4018:    at DeploymentFramework.BuildTasks.GenerateAssemblyNamesItemGroup.Execute()
C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1263,5): error MSB4018:    at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult)
C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1263,5): error MSB4018: 
C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1263,5): error MSB4018: WRN: Assembly binding logging is turned OFF.
C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1263,5): error MSB4018: To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1263,5): error MSB4018: Note: There is some performance penalty associated with assembly bind failure logging.
C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1263,5): error MSB4018: To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1263,5): error MSB4018: 
I have attached the complete file "BP.BuildTemplate.Deployment.btdfproj" below. I use Deployment Framework version 5.0.19.0. BizTalk Software Factory generates the next file automatically. Not sure whether this is a problem?
<?xml version="1.0" encoding="utf-8" ?>
<!-- 
      Deployment Framework for BizTalk 5.0
      Scott Colestock / www.traceofthought.net
      Thomas F. Abraham

      BizTalkSample.dfbtproj is a template build file designed to show how to
      leverage the MSBuild-based deployment framework for BizTalk.
      
      The framework addresses BizTalk 2006 deployments, both for developer desktops
      and for production use after an MSI installation.
      
      It relies on BizTalkDeploymentFramework.targets for the actual BizTalk deployment work; 
      only project-specific variations and deployment work must be done in this file.
      Think of this like a .csproj or .vbproj project file.
-->

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Deploy">

  <PropertyGroup>
    <Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
    <Platform Condition="'$(Platform)' == ''">x86</Platform>
    <SchemaVersion>1.0</SchemaVersion>
    <ProjectName>BP.BuildTemplate</ProjectName>
    <ProjectVersion>1.0</ProjectVersion>

    <!-- The BizTalk application name is default the project name, use the element below to change that -->
    <!-- <BizTalkAppName></BizTalkAppName> -->

    <EnableSideBySide>true</EnableSideBySide>

    <!-- Set following properties to true or false to include various pieces of a BizTalk deployment. -->
    <IncludeSchemas>true</IncludeSchemas>
    <IncludeOrchestrations>true</IncludeOrchestrations>
    <IncludeTransforms>true</IncludeTransforms>
    <IncludePipelines>true</IncludePipelines>
    <IncludeComponents>false</IncludeComponents>
    <IncludePipelineComponents>false</IncludePipelineComponents>
    <IncludeCustomFunctoids>false</IncludeCustomFunctoids>
    <IncludeVocabAndRules>false</IncludeVocabAndRules>
    <IncludeVirtualDirectories>false</IncludeVirtualDirectories>
    <IncludeMessagingBindings>true</IncludeMessagingBindings>
    <IncludeDeploymentTest>false</IncludeDeploymentTest>
    <Includelog4net>false</Includelog4net>
    <IncludeSSO>false</IncludeSSO>
    <IncludeBAM>false</IncludeBAM>

    <UseIsolatedAppDomain>true</UseIsolatedAppDomain>

    <!-- Name of the portbindings file, it is added as resource to the application so the name should be unique -->
    <PortBindings>PortbindingsMaster.xml</PortBindings>
    <UsingMasterBindings>true</UsingMasterBindings>

    <!-- Set to a value if developer needs local version of environment settings. -->
    <!--<DeveloperPreProcessSettings>$(MSBuildProjectDirectory)\EnvironmentSettings\local_settings.xml</DeveloperPreProcessSettings>-->

    <!-- We are asking the deployment framework to create MSBuild properties from the values
        in our environment settings file that are named here. ssoAppUserGroup and ssoAppAdminGroup
        should be supplied if they need to be different for SSO app creation than the defaults
        specified in BizTalkDeploymentFramework.targets -->
    <PropsFromEnvSettings></PropsFromEnvSettings>

    <FilesToXmlPreprocess></FilesToXmlPreprocess>

    <!-- Relative path to a folder that holds assemblies to be GAC'd/unGAC'd along with the rest of the solution. -->
    <ExternalAssembliesPath>..\ExternalReferences</ExternalAssembliesPath>
    <ExternalAssemblies></ExternalAssemblies>

    <!-- Properties to assist in deploying BizTalk rule engine vocabularies and rules
        This sample does NOT include rules at this point - these properties just illustrate
        what you would do if you had them.  The DeployBTRules.exe utility is used by
        the include file to support this functionality.  -->
    <RuleVocabulary>BP.BuildTemplate.RuleVocabulary.1.3.xml</RuleVocabulary>
    <RulePolicy>BP.BuildTemplate.RulePolicy.1.1.xml</RulePolicy>
    <RulePolicyName>SomeBusinessRuleMsgPolicy</RulePolicyName>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
    <DeploymentFrameworkTargetsPath>$(MSBuildExtensionsPath)\DeploymentFrameworkForBizTalk\5.0\</DeploymentFrameworkTargetsPath>
    <OutputPath>bin\Debug\</OutputPath>
    <!-- Get our PDBs into the GAC so we get file/line number information in stack traces. -->
    <DeployPDBsToGac>false</DeployPDBsToGac>
    <!-- We name our host(s) explicitly to avoid having the framework bounce them all. -->
    <BizTalkHosts>BizTalkServerApplication</BizTalkHosts>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)' == 'Release'">
    <DeploymentFrameworkTargetsPath>$(MSBuildExtensionsPath)\DeploymentFrameworkForBizTalk\5.0\</DeploymentFrameworkTargetsPath>
    <OutputPath>bin\Release\</OutputPath>
    <!-- Get our PDBs into the GAC so we get file/line number information in stack traces. -->
    <DeployPDBsToGac>false</DeployPDBsToGac>
    <!-- We name our host(s) explicitly to avoid having the framework bounce them all. -->
    <BizTalkHosts>BizTalkServerApplication</BizTalkHosts>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)' == 'Server'">
    <DeploymentFrameworkTargetsPath>Framework\</DeploymentFrameworkTargetsPath>
    <!-- Get our PDBs into the GAC so we get file/line number information in stack traces. -->
    <DeployPDBsToGac>false</DeployPDBsToGac>
    <!-- We name our host(s) explicitly to avoid having the framework bounce them all. -->
    <BizTalkHosts>BizTalkServerApplication</BizTalkHosts>
  </PropertyGroup>

  <Import Project="$(DeploymentFrameworkTargetsPath)BizTalkDeploymentFramework.targets" />

  <PropertyGroup>
    <!-- Make your MSI unique - your project should change these.  -->
    <ProductId>66B24BD1-0FC1-4ae4-9109-C371134F540C</ProductId>
    <ProductUpgradeCode>5C21D566-0D99-4003-BBF9-53A3739DD7CB</ProductUpgradeCode>
    <ProductName>Deployment.Test</ProductName>
    <ProductVersion>1.0.0</ProductVersion>
    <Manufacturer>Your company name</Manufacturer>
    <PackageDescription>Your description</PackageDescription>
    <PackageComments>Your comments</PackageComments>
  </PropertyGroup>

    <!-- One or more transform assemblies -->
    <ItemGroup>
        <Transforms Include="$(ProjectName).Maps.dll">
            <LocationPath>..\$(ProjectName).Maps\bin\$(Configuration)</LocationPath>
        </Transforms>
    </ItemGroup>

    <ItemGroup>
        <Components Include="$(ProjectName).BusinessComponents.dll">
            <LocationPath>..\$(ProjectName).BusinessComponents\bin\$(Configuration)</LocationPath>
        </Components>
    </ItemGroup>

 <!-- Whatever is required for your project to correctly assemble a "redist" directory should be done here. (Redist contents will be in MSI.) -->
  <Target Name="CustomRedist">
  </Target>

</Project>

```
Coordinator
May 29, 2013 at 4:10 PM
The error is "Could not load file or assembly 'C:\BizTalkDev\BP.BuildTemplate\BP.BuildTemplate.Orchestrations\bin\Release\BP.BuildTemplate.Orchestrations.dll' or one of its dependencies. The system cannot find the file specified."

It could be as simple as building the solution before running the deploy or undeploy so that the DLL is created (assuming that you actually have an Orchestrations DLL). You have IncludeOrchestrations set to true but no explicit Orchestrations ItemGroup, so the default path is in effect. Just make sure that the file exists in that location, and if you have a different path where it resides then add an explicit Orchestrations ItemGroup like you did for the Transforms.

Thanks,
Tom
May 30, 2013 at 2:36 PM
Hi Tom,

I have rerun BTDF project wizard, which creates a new file "Deployment.btdfproj" (see the attached XML). This works for me now. Thanks for your support.
<?xml version="1.0" encoding="utf-8"?>
<!-- 
  Deployment Framework for BizTalk 5.0
  Copyright (C) 2004-2012 Thomas F. Abraham and Scott Colestock
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Installer">
  <PropertyGroup>
    <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
    <Platform Condition="'$(Platform)' == ''">x86</Platform>
    <SchemaVersion>1.0</SchemaVersion>
    <ProjectName>BP.BuildTemplate</ProjectName>
    <ProjectVersion>1.0</ProjectVersion>
    <EnableSideBySide>true</EnableSideBySide>
    <IncludeComponents>True</IncludeComponents>
    <IncludeSSO>False</IncludeSSO>
    <UsingMasterBindings>True</UsingMasterBindings>
    <RequireXmlPreprocessDirectives>False</RequireXmlPreprocessDirectives>
    <IncludeCompsAndVDirsAsResources>True</IncludeCompsAndVDirsAsResources>
  </PropertyGroup>
  <PropertyGroup>
    <!-- Properties related to building an MSI for server deployments -->
    <!-- BizTalk App Version Upgrade -->
    <!--   For each new product release to be deployed to your BizTalk servers: -->
    <!--     1) Increment ProductVersion -->
    <!--     2) Generate a new GUID and update ProductId with the new GUID -->
    <!--   This allows the new MSI to automatically uninstall (not undeploy!) the old MSI and install the new one. -->
    <ProductVersion>1.0.0</ProductVersion>
    <ProductId>7780cefd-10e2-4320-a04f-ab3b1da9f792</ProductId>
    <!-- BizTalk App Version Upgrade -->
    <ProductName>BP.BuildTemplate for BizTalk</ProductName>
    <Manufacturer>Deployment Framework User</Manufacturer>
    <PackageDescription>BP.BuildTemplate</PackageDescription>
    <PackageComments>BP.BuildTemplate</PackageComments>
    <!-- NEVER change the ProductUpgradeCode. -->
    <ProductUpgradeCode>cbe2b5ff-8a5e-4fc7-8984-3d764130941e</ProductUpgradeCode>
  </PropertyGroup>
  <!-- Under TFS Team Build, set CustomizableOutDir property to true in TFS 2005/2008/2010 UpgradeTemplate. -->
  <!-- With a workflow build, copy the default template then modify the MSBuild task for the solution build. Set OutDir to blank and -->
  <!-- CommandLineArguments to String.Format("/p:SkipInvalidConfigurations=true;TeamBuildOutDir=""{0}"" {1}", BinariesDirectory, MSBuildArguments). -->
  <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
    <DeploymentFrameworkTargetsPath>$(MSBuildExtensionsPath)\DeploymentFrameworkForBizTalk\5.0\</DeploymentFrameworkTargetsPath>
    <OutputPath Condition="'$(TeamBuildOutDir)' == ''">bin\Debug\</OutputPath>
    <OutputPath Condition="'$(TeamBuildOutDir)' != ''">$(TeamBuildOutDir)</OutputPath>
    <DeployPDBsToGac>false</DeployPDBsToGac>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)' == 'Release'">
    <DeploymentFrameworkTargetsPath>$(MSBuildExtensionsPath)\DeploymentFrameworkForBizTalk\5.0\</DeploymentFrameworkTargetsPath>
    <OutputPath Condition="'$(TeamBuildOutDir)' == ''">bin\Release\</OutputPath>
    <OutputPath Condition="'$(TeamBuildOutDir)' != ''">$(TeamBuildOutDir)</OutputPath>
    <DeployPDBsToGac>false</DeployPDBsToGac>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)' == 'Server'">
    <DeploymentFrameworkTargetsPath>Framework\</DeploymentFrameworkTargetsPath>
    <!-- Get our PDBs into the GAC so we get file/line number information in stack traces. -->
    <DeployPDBsToGac>true</DeployPDBsToGac>
  </PropertyGroup>
  <!-- !!! TODO !!! -->
  <!-- Add ItemGroup elements that contain one or more Schemas, Orchestrations, Transforms, etc. elements that describe -->
  <!-- the specific artifacts in your solution that need to be deployed. Use IntelliSense as a guide. -->
  <ItemGroup>
    <Schemas Include="$(ProjectName).Schemas.dll">
      <LocationPath>..\$(ProjectName).Schemas\bin\$(Configuration)</LocationPath>
    </Schemas>
      <Orchestrations Include="$(ProjectName).Orchestrations.dll">
          <LocationPath>..\$(ProjectName).Orchestrations\bin\$(Configuration)</LocationPath>
      </Orchestrations>
      <Transforms Include="$(ProjectName).Maps.dll">
          <LocationPath>..\$(ProjectName).Maps\bin\$(Configuration)</LocationPath>
      </Transforms>
      <Components Include="$(ProjectName).BusinessComponents.dll">
          <LocationPath>..\$(ProjectName).BusinessComponents\bin\$(Configuration)</LocationPath>
      </Components>
  </ItemGroup>
  <!-- !!! TODO !!! -->
  <Import Project="$(DeploymentFrameworkTargetsPath)BizTalkDeploymentFramework.targets" />
  <!--
    The Deployment Framework automatically packages most files into the server install MSI.
    However, if there are special folders that you need to include in the MSI, you can
    copy them to the folder $(RedistDir) in the CustomRedist target.
    To include individual files, add an ItemGroup with AdditionalFiles elements.
  -->
  <Target Name="CustomRedist">
  </Target>
</Project>
Coordinator
May 31, 2013 at 4:55 AM
Great, thanks for the update. I strongly encourage you to upgrade to the current v5.0 release. A lot has changed since the version you are using with the BizTalk Software Factory.

Thanks,
Tom