ESB Toolkit overrides BizTalk config (BTSNTSvc.exe.config)

I’ve setup a BizTalk Server 2013 environment with ESB Toolkit 2.2 and since I use Enterprise Library for logging I also updated the BTSNTSvc64.exe.config file, but when I tried to run a sample application it throws an error:

Activation error occured while trying to get instance of type LogWriter, key “”:Microsoft.Practices.ServiceLocation.ActivationException: Activation error occured while trying to get instance of type LogWriter, key “” —> Microsoft.Practices.Unity.ResolutionFailedException: Resolution of the dependency failed, type = “Microsoft.Practices.EnterpriseLibrary.Logging.LogWriter”, name = “(none)”.

Exception occurred while: while resolving.

Exception is: InvalidOperationException – The type LogWriter cannot be constructed. You must configure the container to supply this value.

Apparently, ESBToolkit is overriding the BizTalk configuration.

Solution:

Move the configuration to \esb.config file.