vocabulary deploy error

Topics: Bindings File, Settings Management and SSO, General Questions
Nov 22, 2010 at 1:42 PM

Hi,

i am deploying biztalk application using deployment framework and also deploying vocabularies during deployment. i am getting below error message while deployment can you please help.

it is saying that it is not getting Microsoft.BizTalk.CAT.BestPractices.Framework.dll" although before vocabulary deployments it is already deployed.

 

 
DeploySharedAssemblies:
  Deploying additional assemblies to GAC...
  "C:\Program Files (x86)\Deployment Framework for BizTalk\5.0\Framework\DeployTools\gacutil.exe" /i "C:\Program Files (x86)\Deployment Framework for BizTalk\5.0\Framework\DeployTools\SSOSettingsFileReader.dll"
  Microsoft (R) .NET Global Assembly Cache Utility.  Version 4.0.30319.1
  Copyright (c) Microsoft Corporation.  All rights reserved.
 
  Assembly successfully added to the cache
  Finished deploying additional assemblies to GAC.
DeployExternalAssemblies:
  Deploying external assemblies...
  "C:\Program Files (x86)\Deployment Framework for BizTalk\5.0\Framework\DeployTools\gacutil.exe" /i "..\References\Microsoft.BizTalk.CAT.BestPractices.Framework.dll"
  Microsoft (R) .NET Global Assembly Cache Utility.  Version 4.0.30319.1
  Copyright (c) Microsoft Corporation.  All rights reserved.
 
  Assembly successfully added to the cache
  Finished deploying external assemblies.
DeployPipelineComponents:
  Copying file from "..\Ims.Integration.Pipelines.Components\bin\Debug\Ims.Integration.Pipelines.Components.dll" to "C:\Program Files (x86)\Microsoft BizTalk Server 2010\Pipeline Components\Ims.Integration.Pipelines.Components.dll".
  copy /y "..\Ims.Integration.Pipelines.Components\bin\Debug\Ims.Integration.Pipelines.Components.dll" "C:\Program Files (x86)\Microsoft BizTalk Server 2010\Pipeline Components\Ims.Integration.Pipelines.Components.dll"
  "C:\Program Files (x86)\Deployment Framework for BizTalk\5.0\Framework\DeployTools\gacutil.exe" /i "..\Ims.Integration.Pipelines.Components\bin\Debug\Ims.Integration.Pipelines.Components.dll"
  Microsoft (R) .NET Global Assembly Cache Utility.  Version 4.0.30319.1
  Copyright (c) Microsoft Corporation.  All rights reserved.
 
  Assembly successfully added to the cache
UndeployVocabAndRules:
  Populating metadata in ItemGroup from policy/vocabulary files content...
    Working on '..\Artefacts\BRE\Vocabularies\Cats.InstrumentationFramework.xml'...
      Added item [PolicyName:'Cats.Instrumentation.Framework'; PolicyVersion:'1.0']
  Finished populating metadata in ItemGroup from policy/vocabulary files content.
  "C:\Program Files (x86)\Deployment Framework for BizTalk\5.0\Framework\DeployTools\DeployBTRules.exe" /vocabularyName "Cats.Instrumentation.Framework" /ruleSetVersion "1.0" /unpublish /undeploy
  BizTalk Rules Engine Policy/Vocabulary Deployment Tool v1.1.0.0
  Copyright (C) 2005-2010 Scott Colestock, Thomas F. Abraham
 
  Warning: Could not find a published vocabulary with name 'Cats.Instrumentation.Framework' and version '1.0'.
  Operation complete.
 
DeployVocabAndRules:
  "C:\Program Files (x86)\Deployment Framework for BizTalk\5.0\Framework\DeployTools\DeployBTRules.exe" /ruleSetFile "..\Artefacts\BRE\Vocabularies\Cats.InstrumentationFramework.xml"
  BizTalk Rules Engine Policy/Vocabulary Deployment Tool v1.1.0.0
  Copyright (C) 2005-2010 Scott Colestock, Thomas F. Abraham
 
  Importing and publishing from file '..\Artefacts\BRE\Vocabularies\Cats.InstrumentationFramework.xml'...
  Failed: Microsoft.RuleEngine.BusinessRulesLanguageValidationException: Unable to locate assembly "Microsoft.BizTalk.CAT.BestPractices.Framework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=409a3049a6a15f43".
  File: "C:\Workspaces\amit.more\KBBInt\R1\Source\BizTalk\Core\Artefacts\BRE\Vocabularies\Cats.InstrumentationFramework.xml", line: 12, position: 13 ---> Microsoft.RuleEngine.RuleEngineConfigurationAssemblyNotFoundException: Unable to locate assembly "Microsoft.BizTalk.CAT.BestPractices.Framework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=409a3049a6a15f43". ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.BizTalk.CAT.BestPractices.Framework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=409a3049a6a15f43' or one of its dependencies. The system cannot find the file specified.
  File name: 'Microsoft.BizTalk.CAT.BestPractices.Framework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=409a3049a6a15f43'
     at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
     at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
     at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
     at System.Reflection.Assembly.Load(String assemblyString)
     at Microsoft.RuleEngine.RemoteUpdateService.RemoteUpdateService.LocateAssembly(String assembly)
 
  WRN: Assembly binding logging is turned OFF.
  To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
  Note: There is some performance penalty associated with assembly bind failure logging.
  To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
 
     --- End of inner exception stack trace ---
     at Microsoft.RuleEngine.RemoteUpdateService.RemoteUpdateService.LocateAssembly(String assembly)
     at Microsoft.RuleEngine.BusinessRulesLanguageConverter.LocateType(String assembly, String className)
     at Microsoft.RuleEngine.BusinessRulesLanguageConverter.ProcessVocabularyClassInformation(XmlReader vrdr)
     at Microsoft.RuleEngine.BusinessRulesLanguageConverter.ProcessVocabularyClassMemberBinding(XmlReader vrdr, Guid id, String name, String description)
     at Microsoft.RuleEngine.BusinessRulesLanguageConverter.ProcessVocabularyBinding(XmlReader vrdr, Guid id, String name, String description)
     at Microsoft.RuleEngine.BusinessRulesLanguageConverter.ProcessVocabularyDefinition(XmlReader vrdr)
     at Microsoft.RuleEngine.BusinessRulesLanguageConverter.ProcessVocabulary(XmlReader vrdr, VocabularyDictionary vocabulary)
     at Microsoft.RuleEngine.BusinessRulesLanguageConverter.Load(Stream input, VocabularyDictionary& vocabularies, RuleSetDictionary& ruleSets)
     --- End of inner exception stack trace ---
     at Microsoft.RuleEngine.BusinessRulesLanguageConverter.Load(Stream input, VocabularyDictionary& vocabularies, RuleSetDictionary& ruleSets)
     at Microsoft.RuleEngine.FileRuleStore.LoadFile()
     at Microsoft.BizTalk.RuleEngineExtensions.RuleSetDeploymentDriver.ImportAndPublishFileRuleStore(String fullFileName)
     at DeployBTRules.DeployRules.Main(String[] args)
 
C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1473,5): error MSB3073: The command ""C:\Program Files (x86)\Deployment Framework for BizTalk\5.0\Framework\DeployTools\DeployBTRules.exe" /ruleSetFile "..\Artefacts\BRE\Vocabularies\Cats.InstrumentationFramework.xml"" exited with code -1. [C:\Workspaces\amit.more\KBBInt\R1\Source\BizTalk\Core\Ims.Integration.Core.Deployment\Ims.Integration.Core.Deployment.btdfproj]
Done Building Project "C:\Workspaces\amit.more\KBBInt\R1\Source\BizTalk\Core\Ims.Integration.Core.Deployment\Ims.Integration.Core.Deployment.btdfproj" (Deploy target(s)) -- FAILED.

Build FAILED.

"C:\Workspaces\amit.more\KBBInt\R1\Source\BizTalk\Core\Ims.Integration.Core.Deployment\Ims.Integration.Core.Deployment.btdfproj" (Deploy target) (1) ->
(DeployVocabAndRules target) ->
  C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1473,5): error MSB3073: The command ""C:\Program Files (x86)\Deployment Framework for BizTalk\5.0\Framework\DeployTools\DeployBTRules.exe" /ruleSetFile "..\Artefacts\BRE\Vocabularies\Cats.InstrumentationFramework.xml"" exited with code -1. [C:\Workspaces\amit.more\KBBInt\R1\Source\BizTalk\Core\Ims.Integration.Core.Deployment\Ims.Integration.Core.Deployment.btdfproj]

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:16.45

 

i have added below entries to my BTDF project

<IncludeVocabAndRules>true</IncludeVocabAndRules>
<ItemGroup>
        <RuleVocabularies Include="Cats.InstrumentationFramework.xml">
            <LocationPath>..\Artefacts\BRE\Vocabularies</LocationPath>
        </RuleVocabularies>
    </ItemGroup>

<ItemGroup>
        <ExternalAssemblies Include="Microsoft.BizTalk.CAT.BestPractices.Framework.dll">
            <LocationPath>..\References</LocationPath>
        </ExternalAssemblies>
    </ItemGroup>

 

regards

Amit

Coordinator
Nov 22, 2010 at 11:29 PM

I suspect it could have to do with which GAC Microsoft.BizTalk.CAT.BestPractices.Framework.dll is being installed into vs. which GAC DeployBTRules.exe is using when it calls into the BizTalk code.  One is under \Windows\assembly ("old") and the other under \Windows\Microsoft.NET\assembly ("new 4.0").

Can you please see which GAC the DLL ended up in?  You can also use FusLogVw.exe from the Windows SDK (try both 2.x/3.x version and 4.0 version) to watch the .NET binding process and see where the tool is looking for the DLL.

Please let me know what you find.

Thanks,
Tom

Nov 23, 2010 at 8:09 AM

dll is going under C:\Windows\Microsoft.NET\assembly\GAC_MSIL

and here is the log from FusLogVw.exe

<!-- saved from url=(0015)assemblybinder: -->
*** Assembly Binder Log Entry  (23/11/2010 @ 09:02:38) ***

The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.

Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
Running under executable  C:\Program Files (x86)\Deployment Framework for BizTalk\5.0\Framework\DeployTools\DeployBTRules.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: User = ADCA-KBBI-BLD03\kbbiuser
LOG: DisplayName = Microsoft.BizTalk.CAT.BestPractices.Framework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=409a3049a6a15f43
 (Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/Deployment Framework for BizTalk/5.0/Framework/DeployTools/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = NULL
Calling assembly : Microsoft.RuleEngine, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Post-policy reference: Microsoft.BizTalk.CAT.BestPractices.Framework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=409a3049a6a15f43
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Deployment Framework for BizTalk/5.0/Framework/DeployTools/Microsoft.BizTalk.CAT.BestPractices.Framework.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Deployment Framework for BizTalk/5.0/Framework/DeployTools/Microsoft.BizTalk.CAT.BestPractices.Framework/Microsoft.BizTalk.CAT.BestPractices.Framework.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Deployment Framework for BizTalk/5.0/Framework/DeployTools/Microsoft.BizTalk.CAT.BestPractices.Framework.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Deployment Framework for BizTalk/5.0/Framework/DeployTools/Microsoft.BizTalk.CAT.BestPractices.Framework/Microsoft.BizTalk.CAT.BestPractices.Framework.EXE.
LOG: All probing URLs attempted and failed.

Nov 23, 2010 at 9:59 AM

didn't find anything on 4.0 version

Coordinator
Nov 23, 2010 at 4:41 PM

Did you rebuild Microsoft.BizTalk.CAT.BestPractices.Framework.dll targeting .NET 4.0?

Can you try this?  Create a new file in C:\Program Files (x86)\Deployment Framework for BizTalk\5.0\Framework\DeployTools called DeployBTRules.exe.config.  Add the following XML to the new file and save it.  Then retry the deployment.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.0" />
        <supportedRuntime version="v2.0.50727" />
    </startup>
</configuration>

Please let me know the results.

Thanks,
Tom

Nov 23, 2010 at 5:05 PM

hi Tom,

thanks for your reply,right now i am not in office i will try this tommarrow early morning and let you know.

 

Nov 23, 2010 at 5:34 PM

yahooooooo...

problem is solved, i just tried and it works ... thanks a lot for your help...

just wanted to know ,, do we need to deploy this file as well the one which we creted above on each server where we run this deployment? using deployment framework...

 

Coordinator
Nov 23, 2010 at 6:04 PM

Great, thanks.  I'll include DeployBTRules.exe.config in the final release.

For now, if the computer on which you build your server deploy MSI has that file in place, it should be pulled into the MSI automatically.  You wouldn't need to install anything on the servers besides your app's MSI.

Thanks,
Tom

Jan 27, 2011 at 6:01 PM

Hi Tom

I am also getting the same issue and the creating the config file for xml provided didnt work for me. Can you please help.

Regards,

Sanjay

Coordinator
Jan 27, 2011 at 8:29 PM

You did not create DeployBTRules.exe.config did you?  It is already included with the Deployment Framework install.  You are using BizTalk 2010 and referencing some assembly from your rules policy?  What error are you seeing?

Thanks,
Tom

Jan 31, 2011 at 3:04 AM

Hi Tom,

I created DeployBTRules.exe.config, same way as you described. I am using BizTalk server 2009. There is a policy which is using a vocab and vocab is using a class library. So i specified the vocab prior to the policy in btdf but after the class library which vocab is using. when i run the btdf i am getting the error saying that class library couldnt be loaded. After getting the error when i check GAC and found the class library there. Please help.

 

Regards,

Sanjay

Coordinator
Jan 31, 2011 at 3:48 AM

Hi Sanjay,

If you created DeployBTRules.exe.config because it was not already present next to DeployBTRules.exe, then you are not using the latest version of the Deployment Framework.  Would you mind uninstalling and re-installing with the latest RC download from here, then retry?

Thanks!
Tom

Feb 6, 2011 at 9:35 PM

Hi Tom,

Sorry for late reply. I had deployed DeploymentFrameworkForBizTalkV5_0_25RC.msi earlier from the download section. I couldnt find higher version there. Please suggest.

Regards,

Sanjay

 

Coordinator
Feb 7, 2011 at 5:21 AM

I apologize -- it was fixed AFTER the release candidate build.

So you are creating DeployBTRules.exe.config next to DeployBTRules.exe with these contents:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.0" />
        <supportedRuntime version="v2.0.50727" />
    </startup>
</configuration>

And that is not working for you.

The order in which you specify policies and vocabs and component class libraries in the .btdfproj does not matter.  Since you are using BizTalk 2009, you are building everything against .NET 3.5, 3.0 or 2.0, right?  And it is in c:\windows\assembly that you are finding your DLL?  Do you also have .NET 4.0 installed?

Thanks,
Tom