在针对已安装 Enterprise Library 5.0 并由 ESB 2.1 使用的服务器执行发布时出现以下错误(不能仅取消注释掉 machine.config 中的引用):
16/01/2015 13:58:54 - Error - (1120, 1116) - [A]Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceSection cannot be cast to [B]Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceSection. Type A originates from 'Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' in the context 'Default' at location 'C:\Windows\assembly\GAC_MSIL\Microsoft.Practices.EnterpriseLibrary.Common\5.0.414.0__31bf3856ad364e35\Microsoft.Practices.EnterpriseLibrary.Common.dll'. Type B originates from 'Microsoft.Practices.EnterpriseLibrary.Common, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' in the context 'Default' at location 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\Release Management\bin\Microsoft.Practices.EnterpriseLibrary.Common.dll'.: \r\n\r\n at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceFactory.Create()
at Microsoft.TeamFoundation.Release.Data.Model.DataErrorPropertyChangedBase.Validate()
at Microsoft.TeamFoundation.Release.Data.Model.DataErrorPropertyChangedBase.OnPropertyChanged(String propertyName, Boolean setDirty, Boolean validate)
at Microsoft.TeamFoundation.Release.Data.Model.SystemSettings..ctor(Rtm13Services rtm13Services)
Deployment Agent 2013 软件安装到“C:\Program Files (x86)\Microsoft Visual Studio 12.0\Release Management\bin\Microsoft.Practices.EnterpriseLibrary.Common.dll”。
我设法通过删除 machine.config 文件中对 Enterprise Library 5.0 的引用来使部署工作,但我知道这些是我们的 BizTalk 开发人员使用的 ESB 2.1 软件所需要的 - 我知道在 machine.config 中注释掉不是一种选择。
有谁知道如何解决这个问题?