【发布时间】:2009-06-24 19:08:11
【问题描述】:
我正在尝试对安装了 9.3 版本的机器上针对供应商库的 9.1 版本构建的应用程序进行故障排除。供应商提供了一个发布者策略文件,该文件将所有版本从 9.0 开始重定向到他们的 9.3 dll,并安装在 GAC 中。
使用基于 9.2 版构建的较新版本的应用程序,可以找到发布者策略文件,并且一切正常。对于 9.1 链接版本,发布者策略文件根本不会在 fuslogvw 结果中提及。
这是从 fuslogvw 成功加载的示例:
LOG: This bind starts in default load context.
LOG: Using application configuration file: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe.Config
LOG: Using machine configuration file from c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Publisher policy file is found at C:\WINDOWS\assembly\GAC_MSIL\policy.9.2.ESRI.ArcGIS.System\9.3.0.1770__8fc3cc631e44ad86\ESRI.ArcGIS.System.config.
LOG: Publisher policy file redirect is found: 9.2.0.1324 redirected to 9.3.0.1770.
LOG: ProcessorArchitecture is locked to MSIL.
LOG: Post-policy reference: ESRI.ArcGIS.System, Version=9.3.0.1770, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86, processorArchitecture=MSIL
LOG: Found assembly by looking in the GAC.
LOG: Binding succeeds. Returns assembly from C:\WINDOWS\assembly\GAC_MSIL\ESRI.ArcGIS.System\9.3.0.1770__8fc3cc631e44ad86\ESRI.ArcGIS.System.dll.
LOG: Assembly is loaded in default load context.
而且,这里是失败的:
LOG: This bind starts in default load context.
LOG: Using application configuration file: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe.Config
LOG: Using machine configuration file from c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Post-policy reference: ESRI.ArcGIS.System, Version=9.1.0.722, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Program Files/NatureServe/Vista/ESRI.ArcGIS.System.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/NatureServe/Vista/ESRI.ArcGIS.System/ESRI.ArcGIS.System.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/NatureServe/Vista/ESRI.ArcGIS.System.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/NatureServe/Vista/ESRI.ArcGIS.System/ESRI.ArcGIS.System.EXE.
LOG: All probing URLs attempted and failed.
注意:显示名称、文化和公钥标记是相同的。
那么,有什么不同(除了版本号)?为什么 .NET 找不到策略文件?我们需要做什么黑魔法来克服这个问题(直到我们可以放弃对他们的 9.1 平台的支持)?
【问题讨论】: