The "UpdateBizTalkDebuggingConfig" task failed unexpectedly

Topics: Bindings File, Settings Management and SSO, General Questions, Server Deployment
Sep 6, 2012 at 12:32 PM

Hi All,

I install the msi created out of the BTDF, I get the following error. I am not sure the cause

 

   Target DeployBtsNtSvcExeConfig:
                Updating D:\Program Files\Microsoft BizTalk Server 2006\BTSNTSvc.exe.config...
                Adding/updating debugging configuration data...
                C:\Program Files\ITradenetwork Message Hub - Common v5\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1015,5): error MSB4018: The "UpdateBizTalkDebuggingConfig" task failed unexpectedly.\r
                C:\Program Files\ITradenetwork Message Hub - Common v5\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1015,5): error MSB4018: System.InvalidOperationException: There was an error generating the XML document. ---> System.MemberAccessException: The ApplicationBase must be set before retrieving this property.\r
                C:\Program Files\ITradenetwork Message Hub - Common v5\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1015,5): error MSB4018:    at System.AppDomainSetup.NormalizePath(String path, Boolean useAppBase)\r
                C:\Program Files\ITradenetwork Message Hub - Common v5\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1015,5): error MSB4018:    at System.AppDomainSetup.VerifyDir(String dir, Boolean normalize)\r
                C:\Program Files\ITradenetwork Message Hub - Common v5\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1015,5): error MSB4018:    at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterConfiguration.Write7_AppDomainSetup(String n, String ns, AppDomainSetup o, Boolean isNullable, Boolean needType)\r
                C:\Program Files\ITradenetwork Message Hub - Common v5\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1015,5): error MSB4018:    at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterConfiguration.Write8_AppDomainSpec(String n, String ns, AppDomainSpec o, Boolean isNullable, Boolean needType)\r
                C:\Program Files\ITradenetwork Message Hub - Common v5\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1015,5): error MSB4018:    at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterConfiguration.Write11_AppDomains(String n, String ns, AppDomains o, Boolean isNullable, Boolean needType)\r
                C:\Program Files\ITradenetwork Message Hub - Common v5\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1015,5): error MSB4018:    at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterConfiguration.Write13_Configuration(String n, String ns, Configuration o, Boolean isNullable, Boolean needType)\r
                C:\Program Files\ITradenetwork Message Hub - Common v5\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1015,5): error MSB4018:    at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterConfiguration.Write14_Configuration(Object o)\r
                C:\Program Files\ITradenetwork Message Hub - Common v5\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1015,5): error MSB4018:    --- End of inner exception stack trace ---\r
                C:\Program Files\ITradenetwork Message Hub - Common v5\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1015,5): error MSB4018:    at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)\r
                C:\Program Files\ITradenetwork Message Hub - Common v5\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1015,5): error MSB4018:    at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o)\r
                C:\Program Files\ITradenetwork Message Hub - Common v5\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1015,5): error MSB4018:    at DeploymentFramework.BuildTasks.UpdateBTSNTSvcExeConfigBase.PutXlangsSection(XmlDocument btsConfig, Configuration config)\r
                C:\Program Files\ITradenetwork Message Hub - Common v5\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1015,5): error MSB4018:    at DeploymentFramework.BuildTasks.UpdateBTSNTSvcExeConfigBase.UpdateBizTalkConfigFile(String configFilePath)\r
                C:\Program Files\ITradenetwork Message Hub - Common v5\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1015,5): error MSB4018:    at DeploymentFramework.BuildTasks.UpdateBTSNTSvcExeConfigBase.Execute()\r
                C:\Program Files\ITradenetwork Message Hub - Common v5\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1015,5): error MSB4018:    at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult)
            Done building target "DeployBtsNtSvcExeConfig" in project "Deployment.btdfproj" -- FAILED.
        Done building target "DeployBizTalkMgmtDB_true" in project "Deployment.btdfproj" -- FAILED.
    Done building target "ServerDeploy" in project "Deployment.btdfproj" -- FAILED.
Done building target "Deploy" in project "Deployment.btdfproj" -- FAILED.

Done building project "Deployment.btdfproj" -- FAILED.

 

Coordinator
Sep 7, 2012 at 4:21 AM

Is this just a standard, released version of BizTalk?  The error is coming from a simple XmlSerializer.Serialize() call.  Maybe it's due to your existing XML.  Do you already have an <xlangs> section in your BTSNTSvc.exe.config (and/or Svc64)?

Thanks,
Tom

Sep 7, 2012 at 10:54 AM

Hi Tom,

Thanks for reply.

We have already installed ESG-Guidance, yes <xlang> filed is already there. Anything we can do here.

<xlangs>
    <Configuration>
      <AppDomains AssembliesPerDomain="10">
        <DefaultSpec SecondsIdleBeforeShutdown="1200" SecondsEmptyBeforeShutdown="1800" />
        <AppDomainSpecs>
          <AppDomainSpec Name="Microsoft.Practices.ESB">
            <BaseSetup>
              <ConfigurationFile>
                d:\Projects\Microsoft.Practices.ESB\Source\Core\Config\Microsoft.Practices.ESB.PipelineComponents.config
              </ConfigurationFile>
            </BaseSetup>
          </AppDomainSpec>
        </AppDomainSpecs>
        <PatternAssignmentRules>
          <PatternAssignmentRule AssemblyNamePattern="Microsoft.Practices.ESB.*" AppDomainName="Microsoft.Practices.ESB" />
        </PatternAssignmentRules>
      </AppDomains>
    </Configuration>
  </xlangs>

Sep 7, 2012 at 10:57 AM

Hi Tom,

FYI, we use BizTalk Sverver 2006 R2.

Coordinator
Sep 7, 2012 at 3:35 PM

Did you add that configuration manually or is that something that the ESB Toolkit installer did?  It appears from the call stack that the AppDomainSpec section is the problem.  It ends up failing trying to do System.AppDomainSetup.VerifyDir() and soon after "The ApplicationBase must be set before retrieving this property."  That would seem to suggest that it is expecting to see another element or attribute inside the AppDomainSpec that isn't there.

I think you just need to fill in another element or two, and there's a good example here.  See the Example: AppDomain configuration section.

Thanks,
Tom

Sep 20, 2012 at 1:02 PM

Hi Tom,

I have removed the <XLANG> section from our BTSNTSVC.exe.config file and the installation of msi worked now.

But this is the second BizTalk project where we use deployment framework and first project was done few months ago by one of our contractors who is not with us now. Though the first project used deployment framework we didn't find any issues like this, though even then we had the <XLANG> section in our BTSNTSVC.exe.config file.

Is this to do with the version of Deployment framework I have used for the second project or any configuration change required to avoid this error?

Thanks

 

 

Coordinator
Sep 27, 2012 at 4:56 AM

The code related to the BizTalk config file has not changed for a long time (as I recall).  The load and save of this XML is actually BizTalk's own code, just wrapped into an MSBuild task.

I think all you are missing is to add <ApplicationBase>d:\Projects\Microsoft.Practices.ESB\Source\Core\Config</ApplicationBase> (not sure what actual path you need) into the <BaseSetup> element before <ConfigurationFile>.  I'm just looking at the example AppDomain config that I referenced earlier plus the stack trace.  It appears that the AppDomainSetup object (the BaseSetup element is an XML-serialized AppDomainSetup object) requires ApplicationBase to be set.

Thanks,
Tom