Error Deploying BZT app in 64 bits Biztalk 2010 server

Topics: General Questions, Getting Started/Beginner, Server Deployment
Dec 15, 2010 at 7:09 PM

Hi !

I am trying to deploy a biztalk 2010 application compiled for X86, and I am getting this extrange error while deploying the MSI:

Here the DeployResults.Log:

 Target DeployAppDefinition:
                BTSTask.exe AddApp -ApplicationName:"CapGemini.Adecco.AW.Bts.Core" -Description:"CapGemini.Adecco.AW.Bts.Core"
                Microsoft (R) BizTalk Application Deployment Utility Version 3.9.469.0
                Copyright (c) 2010 Microsoft Corporation. All rights reserved.
               
                Information: Adding new BizTalk application "CapGemini.Adecco.AW.Bts.Core" to configuration database (server="XXXX.aw.capade.capgemini.es", database="BizTalkMgmtDb_Dev")...
                Information: Added application "CapGemini.Adecco.AW.Bts.Core".
               
                Command succeeded with 0 errors, 0 warnings.
               
            Target UndeployOrchestrations:
                D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\Deployment\Framework\BizTalkDeploymentFramework.targets(1200,5): error MSB4018: The "GenerateAssemblyNamesItemGroup" task failed unexpectedly.\r
                D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\Deployment\Framework\BizTalkDeploymentFramework.targets(1200,5): error MSB4018: System.BadImageFormatException: Could not load file or assembly 'D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\CapGemini.Adecco.AW.Bts.Core.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.\r
                D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\Deployment\Framework\BizTalkDeploymentFramework.targets(1200,5): error MSB4018: File name: 'D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\CapGemini.Adecco.AW.Bts.Core.dll'\r
                D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\Deployment\Framework\BizTalkDeploymentFramework.targets(1200,5): error MSB4018:    at System.Reflection.AssemblyName.nGetFileInformation(String s)\r
                D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\Deployment\Framework\BizTalkDeploymentFramework.targets(1200,5): error MSB4018:    at System.Reflection.AssemblyName.GetAssemblyName(String assemblyFile)\r
                D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\Deployment\Framework\BizTalkDeploymentFramework.targets(1200,5): error MSB4018:    at DeploymentFramework.BuildTasks.GenerateAssemblyNamesItemGroup.Execute()\r
                D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\Deployment\Framework\BizTalkDeploymentFramework.targets(1200,5): error MSB4018:    at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult)\r
                D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\Deployment\Framework\BizTalkDeploymentFramework.targets(1200,5): error MSB4018: \r
                D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\Deployment\Framework\BizTalkDeploymentFramework.targets(1200,5): error MSB4018: WRN: Assembly binding logging is turned OFF.\r
                D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\Deployment\Framework\BizTalkDeploymentFramework.targets(1200,5): error MSB4018: To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.\r
                D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\Deployment\Framework\BizTalkDeploymentFramework.targets(1200,5): error MSB4018: Note: There is some performance penalty associated with assembly bind failure logging.\r
                D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\Deployment\Framework\BizTalkDeploymentFramework.targets(1200,5): error MSB4018: To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].\r
                D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\Deployment\Framework\BizTalkDeploymentFramework.targets(1200,5): error MSB4018:
            Done building target "UndeployOrchestrations" in project "CapGemini.Adecco.AW.Bts.Core.Deployment.btdfproj" -- FAILED.
        Done building target "DeployBizTalkMgmtDB_true" in project "CapGemini.Adecco.AW.Bts.Core.Deployment.btdfproj" -- FAILED.
    Done building target "ServerDeploy" in project "CapGemini.Adecco.AW.Bts.Core.Deployment.btdfproj" -- FAILED.
Done building target "Deploy" in project "CapGemini.Adecco.AW.Bts.Core.Deployment.btdfproj" -- FAILED.

Done building project "CapGemini.Adecco.AW.Bts.Core.Deployment.btdfproj" -- FAILED.

Build FAILED.

D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\Deployment\Framework\BizTalkDeploymentFramework.targets(1200,5): error MSB4018: The "GenerateAssemblyNamesItemGroup" task failed unexpectedly.\r
D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\Deployment\Framework\BizTalkDeploymentFramework.targets(1200,5): error MSB4018: System.BadImageFormatException: Could not load file or assembly 'D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\CapGemini.Adecco.AW.Bts.Core.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.\r
D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\Deployment\Framework\BizTalkDeploymentFramework.targets(1200,5): error MSB4018: File name: 'D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\CapGemini.Adecco.AW.Bts.Core.dll'\r
D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\Deployment\Framework\BizTalkDeploymentFramework.targets(1200,5): error MSB4018:    at System.Reflection.AssemblyName.nGetFileInformation(String s)\r
D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\Deployment\Framework\BizTalkDeploymentFramework.targets(1200,5): error MSB4018:    at System.Reflection.AssemblyName.GetAssemblyName(String assemblyFile)\r
D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\Deployment\Framework\BizTalkDeploymentFramework.targets(1200,5): error MSB4018:    at DeploymentFramework.BuildTasks.GenerateAssemblyNamesItemGroup.Execute()\r
D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\Deployment\Framework\BizTalkDeploymentFramework.targets(1200,5): error MSB4018:    at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult)\r
D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\Deployment\Framework\BizTalkDeploymentFramework.targets(1200,5): error MSB4018: \r
D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\Deployment\Framework\BizTalkDeploymentFramework.targets(1200,5): error MSB4018: WRN: Assembly binding logging is turned OFF.\r
D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\Deployment\Framework\BizTalkDeploymentFramework.targets(1200,5): error MSB4018: To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.\r
D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\Deployment\Framework\BizTalkDeploymentFramework.targets(1200,5): error MSB4018: Note: There is some performance penalty associated with assembly bind failure logging.\r
D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\Deployment\Framework\BizTalkDeploymentFramework.targets(1200,5): error MSB4018: To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].\r
D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\Deployment\Framework\BizTalkDeploymentFramework.targets(1200,5): error MSB4018:
    0 Warning(s)
    1 Error(s)

 

Any idea about what could be the problem ? We recently moved from VS 2008 to VS 2010 I think is in relation but I did not figure out whats the problem

any help will be welcome !

 

Julian

Coordinator
Dec 15, 2010 at 7:56 PM

Hi Julian,

You're almost certainly running the deploy with MSBuild 3.5 instead of 4.0.  The Deployment Framework installs different versions of some files depending on whether BizTalk 2009 or BizTalk 2010 is installed on the machine.  Have you reinstalled the BTDF after upgrading to BizTalk 2010?  On the server where you built the MSI, please check in Program Files (x86)\Deployment Framework for BizTalk\5.0\Framework for ServerDeploy.bat.  Inside, you should find a reference to the 4.0 MSBuild.exe.  If you see references to earlier versions of MSBuild, then you probably need to reinstall the Deployment Framework now that you have BizTalk 2010 installed.

This does not look like a 32-bit vs 64-bit issue.

Thanks,
Tom

Dec 16, 2010 at 11:38 AM

Hi Tom

I checked the file you mentioned, it seems the version of the MSBuild is the right one:

@echo off
SET BTDFMSBuildPath="%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe"

%BTDFMSBuildPath% /p:DeployBizTalkMgmtDB=%BT_DEPLOY_MGMT_DB%;Configuration=Server;SkipUndeploy=true /l:FileLogger,Microsoft.Build.Engine;logfile=..\DeployResults\DeployResults.txt %1
@echo on
@echo -----
@echo off
%BTDFMSBuildPath% Framework\CopyDeployResults.msbuild /nologo
@pause

 

and I installed the framework  after installing biztalk 2010

Thanks for your reply

Julian

Dec 16, 2010 at 2:20 PM

Hi Tom

I fixed my original problem, in my script (the one who launches the install and deploy of our bzt app) was invoking the MSBuild v3.5, I changed the script and I added the 4.0:

IF EXIST "%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" (

SET BTDFMSBuildPath="%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe"

)ELSE IF EXIST "%windir%\Microsoft.NET\Framework\v3.5\MSBuild.exe" (

SET BTDFMSBuildPath="%windir%\Microsoft.NET\Framework\v3.5\MSBuild.exe"

) ELSE IF EXIST "%windir%\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe" (

SET BTDFMSBuildPath="%windir%\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe"

)

now seems to work fine until the section where the framework attempts to deploy some interops in the GAC:

 

                "D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\Deployment\Framework\DeployTools\gacutil.exe" /i "..\Interop.COMSVCSLib.dll"

                Microsoft (R) .NET Global Assembly Cache Utility.  Version 4.0.30319.1

                Copyright (c) Microsoft Corporation.  All rights reserved.

               

                Failure adding assembly to the cache: Administrator permissions are needed to use the selected options. Use an administrator command prompt to complete these tasks.

                D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\Deployment\Framework\BizTalkDeploymentFramework.targets(1264,5): error MSB3073: The command ""D:\Packages\AdeccoWeb_6.8.1(Major)\BizTalk\Core\CapGemini.Adecco.AW.Bts.Core\Deployment\Framework\DeployTools\gacutil.exe" /i "..\Interop.COMSVCSLib.dll"" exited with code 1.

            Done building target "DeployComponents" in project "CapGemini.Adecco.AW.Bts.Core.Deployment.btdfproj" -- FAILED.

        Done building target "DeployBizTalkMgmtDB_true" in project "CapGemini.Adecco.AW.Bts.Core.Deployment.btdfproj" -- FAILED.

    Done building target "ServerDeploy" in project "CapGemini.Adecco.AW.Bts.Core.Deployment.btdfproj" -- FAILED.

Done building target "Deploy" in project "CapGemini.Adecco.AW.Bts.Core.Deployment.btdfproj" -- FAILED.

 

this is very weird, because previously another assembly was added to the GAC without problems...is a strange behavior...

thank you very much for your help

Julian

Coordinator
Dec 16, 2010 at 2:52 PM

Thanks Julian.  I didn't realize/remember that you were kicking this off from another script.

If other DLL's are being GAC'd successfully in the same script, and the process launching the script is not running as Administrator, then maybe that work is being done by BtsTask.  However, I would expect BtsTask to require Adminstrator rights too.  In any case, the normal BTDF process is to force UAC elevation prior to starting the script.  I'm not sure how your script is being started, but in our Framework\DeployTools folder you'll find uacelevate.exe which takes two parameters -- program to start (in double quotes) and command line parameters (grouped into double quotes).  If you don't want a UAC dialog, you'll need to configure whatever starts your script to run as Administrator.

Thanks,
Tom