我们正在推动一个旧的Windows服务,最初是书面的Windows 2003到Windows 2012 R2服务器进行测试,然而,当我们试图运行安装程序的.msi,我们收到以下错误:Windows服务安装错误:错误1001,无法获取C: Program Files .. .. xxx.dll程序集中的安装程序类型程序集。
Error 1001, Unable to get installer types assembly in the C:\Program Files\..\..\xxx.dll assembly. -> . Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
看来,它可能是与Oracle.DataAccess DLL的问题:
日志查看器提供了这样的信息:
*** Assembly Binder Log Entry (7/22/2016 @ 1:54:54 PM) ***
The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable C:\Windows\syswow64\MsiExec.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = Oracle.DataAccess, Version=4.112.4.0, Culture=neutral, PublicKeyToken=89b483f429c47342
(Fully-specified)
LOG: Appbase = file:///C:/Windows/syswow64/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = MsiExec.exe
Calling assembly : CTMSRenewalOutboundService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in LoadFrom load context.
WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().
LOG: No application configuration file found.
LOG: Using host configuration file: C:\Temp\CFG4155.tmp
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Oracle.DataAccess, Version=4.112.4.0, Culture=neutral, PublicKeyToken=89b483f429c47342
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Windows/syswow64/Oracle.DataAccess.DLL.
LOG: Attempting download of new URL file:///C:/Windows/syswow64/Oracle.DataAccess/Oracle.DataAccess.DLL.
LOG: Attempting download of new URL file:///C:/Windows/syswow64/Oracle.DataAccess.EXE.
LOG: Attempting download of new URL file:///C:/Windows/syswow64/Oracle.DataAccess/Oracle.DataAccess.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/PPD/CTMSOutboundService/Oracle.DataAccess.DLL.
LOG: Assembly download was successful. Attempting setup of file: C:\Program Files\PPD\CTMSOutboundService\Oracle.DataAccess.dll
LOG: Entering run-from-source setup phase.
LOG: Assembly Name is: Oracle.DataAccess, Version=4.112.4.0, Culture=neutral, PublicKeyToken=89b483f429c47342
ERR: Invalid assembly platform or ContentType in file (hr = 0x8007000b).
ERR: Run-from-source setup phase failed with hr = 0x8007000b.
LOG: Attempting download of new URL file:///C:/Program Files/PPD/CTMSOutboundService/Oracle.DataAccess/Oracle.DataAccess.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/PPD/CTMSOutboundService/Oracle.DataAccess.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/PPD/CTMSOutboundService/Oracle.DataAccess/Oracle.DataAccess.EXE.
LOG: All probing URLs attempted and failed.
*** Assembly Binder Log Entry (7/22/2016 @ 1:54:54 PM) ***
The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable C:\Windows\syswow64\MsiExec.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = Oracle.DataAccess, Version=4.112.4.0, Culture=neutral, PublicKeyToken=89b483f429c47342
(Fully-specified)
LOG: Appbase = file:///C:/Windows/syswow64/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = MsiExec.exe
Calling assembly : CTMSRenewalOutboundService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in LoadFrom load context.
WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().
LOG: No application configuration file found.
LOG: Using host configuration file: C:\Temp\CFG4155.tmp
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Oracle.DataAccess, Version=4.112.4.0, Culture=neutral, PublicKeyToken=89b483f429c47342
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Windows/syswow64/Oracle.DataAccess.DLL.
LOG: Attempting download of new URL file:///C:/Windows/syswow64/Oracle.DataAccess/Oracle.DataAccess.DLL.
LOG: Attempting download of new URL file:///C:/Windows/syswow64/Oracle.DataAccess.EXE.
LOG: Attempting download of new URL file:///C:/Windows/syswow64/Oracle.DataAccess/Oracle.DataAccess.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/PPD/CTMSOutboundService/Oracle.DataAccess.DLL.
LOG: Assembly download was successful. Attempting setup of file: C:\Program Files\PPD\CTMSOutboundService\Oracle.DataAccess.dll
LOG: Entering run-from-source setup phase.
LOG: Assembly Name is: Oracle.DataAccess, Version=4.112.4.0, Culture=neutral, PublicKeyToken=89b483f429c47342
ERR: Invalid assembly platform or ContentType in file (hr = 0x8007000b).
ERR: Run-from-source setup phase failed with hr = 0x8007000b.
LOG: Attempting download of new URL file:///C:/Program Files/PPD/CTMSOutboundService/Oracle.DataAccess/Oracle.DataAccess.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/PPD/CTMSOutboundService/Oracle.DataAccess.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/PPD/CTMSOutboundService/Oracle.DataAccess/Oracle.DataAccess.EXE.
LOG: All probing URLs attempted and failed.
*** Assembly Binder Log Entry (7/22/2016 @ 4:01:10 PM) ***
The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable C:\Windows\syswow64\MsiExec.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = Oracle.DataAccess, Version=4.112.4.0, Culture=neutral, PublicKeyToken=89b483f429c47342
(Fully-specified)
LOG: Appbase = file:///C:/Windows/syswow64/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = MsiExec.exe
Calling assembly : CTMSRenewalOutboundService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in LoadFrom load context.
WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().
LOG: No application configuration file found.
LOG: Using host configuration file: C:\Temp\CFGDA59.tmp
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Oracle.DataAccess, Version=4.112.4.0, Culture=neutral, PublicKeyToken=89b483f429c47342
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Windows/syswow64/Oracle.DataAccess.DLL.
LOG: Attempting download of new URL file:///C:/Windows/syswow64/Oracle.DataAccess/Oracle.DataAccess.DLL.
LOG: Attempting download of new URL file:///C:/Windows/syswow64/Oracle.DataAccess.EXE.
LOG: Attempting download of new URL file:///C:/Windows/syswow64/Oracle.DataAccess/Oracle.DataAccess.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/PPD/CTMSOutboundService/Oracle.DataAccess.DLL.
LOG: Assembly download was successful. Attempting setup of file: C:\Program Files\PPD\CTMSOutboundService\Oracle.DataAccess.dll
LOG: Entering run-from-source setup phase.
LOG: Assembly Name is: Oracle.DataAccess, Version=4.112.4.0, Culture=neutral, PublicKeyToken=89b483f429c47342
ERR: Invalid assembly platform or ContentType in file (hr = 0x8007000b).
ERR: Run-from-source setup phase failed with hr = 0x8007000b.
LOG: Attempting download of new URL file:///C:/Program Files/PPD/CTMSOutboundService/Oracle.DataAccess/Oracle.DataAccess.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/PPD/CTMSOutboundService/Oracle.DataAccess.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/PPD/CTMSOutboundService/Oracle.DataAccess/Oracle.DataAccess.EXE.
LOG: All probing URLs attempted and failed.
*** Assembly Binder Log Entry (7/22/2016 @ 4:01:10 PM) ***
The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable C:\Windows\syswow64\MsiExec.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = Oracle.DataAccess, Version=4.112.4.0, Culture=neutral, PublicKeyToken=89b483f429c47342
(Fully-specified)
LOG: Appbase = file:///C:/Windows/syswow64/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = MsiExec.exe
Calling assembly : CTMSRenewalOutboundService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in LoadFrom load context.
WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().
LOG: No application configuration file found.
LOG: Using host configuration file: C:\Temp\CFGDA59.tmp
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Oracle.DataAccess, Version=4.112.4.0, Culture=neutral, PublicKeyToken=89b483f429c47342
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Windows/syswow64/Oracle.DataAccess.DLL.
LOG: Attempting download of new URL file:///C:/Windows/syswow64/Oracle.DataAccess/Oracle.DataAccess.DLL.
LOG: Attempting download of new URL file:///C:/Windows/syswow64/Oracle.DataAccess.EXE.
LOG: Attempting download of new URL file:///C:/Windows/syswow64/Oracle.DataAccess/Oracle.DataAccess.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/PPD/CTMSOutboundService/Oracle.DataAccess.DLL.
LOG: Assembly download was successful. Attempting setup of file: C:\Program Files\PPD\CTMSOutboundService\Oracle.DataAccess.dll
LOG: Entering run-from-source setup phase.
LOG: Assembly Name is: Oracle.DataAccess, Version=4.112.4.0, Culture=neutral, PublicKeyToken=89b483f429c47342
ERR: Invalid assembly platform or ContentType in file (hr = 0x8007000b).
ERR: Run-from-source setup phase failed with hr = 0x8007000b.
LOG: Attempting download of new URL file:///C:/Program Files/PPD/CTMSOutboundService/Oracle.DataAccess/Oracle.DataAccess.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/PPD/CTMSOutboundService/Oracle.DataAccess.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/PPD/CTMSOutboundService/Oracle.DataAccess/Oracle.DataAccess.EXE.
LOG: All probing URLs attempted and failed.
我确信尝试两个:
复制Oracle.DataAccess.DLL
的本地副本使用的GAC参考的Oracle.DataAccess.DLL
但是他们俩谁也没上班。
我们已经部署了几个其他Windows服务引用这个DLL,并没有问题。
谢谢。
2016-07-22
jazzBox
+0
你试过[这个](http://stackoverflow.com/a/1648302/5794617)和[this](http://forums.asp.net/t/2006795.aspx?Could+not+load +文件+或+程序集+文件+或+ + +其+ +依赖关系+ +系统+无法+找到+文件+指定)和[本](http://stackoverflow.com/questions/11030500/ assembly-binding-error-bind-result-hr-0x80070002-the-system-can not-find-the)? –