当我尝试运行Microsoft Word的加载项时,我收到此错误。
无法加载文件或程序集' Word,Version = 1.0.0.1, Culture = neutral,PublicKeyToken = null'或其中一个依赖项。一个 强名命的装配是必需的。 (HRESULT的例外情况: 0x80131044)
程序集Word.dll
是从另一个解决方案构建的,并在我对文件本身的插件中引用。 Word
解决方案在该解决方案中也有一些参考。
当我尝试运行我的插件时,我得到上面的错误。我已经尝试签署程序集及其依赖程序集,但同样的问题仍然存在。我已经检查过GAC,看看那里是否安装了旧组件,但也没有运气。
为什么要求这个程序集具有强名称,如果签名对它们没有帮助,这甚至意味着什么呢?
编辑:根据要求,Fusionlog条目。我不确定如何制作这些日志。在我看来,它正在查找正确的文件夹中的装配,虽然它似乎正在寻找一个已签名的装配,我拥有并且一直拥有的装配没有签名。
=== Pre-bind state information ===
LOG: DisplayName = Word, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = file:///<folder>/Word AddIn/bin/Debug/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = NULL
Calling assembly : AddIn2013, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: <folder>\Word AddIn\bin\Debug\AddIn2013.dll.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///<folder>/Word AddIn/bin/Debug/Word.DLL.
LOG: Assembly download was successful. Attempting setup of file: <folder>\Word AddIn\bin\Debug\Word.dll
LOG: Entering download cache setup phase.
LOG: Assembly Name is: Word, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null
LOG: Binding succeeds. Returns assembly from %appdata%\Local\assembly\dl3\CDT9D6R7.5N1\J6WPRMT3.DDT\48a5090d\952e5901_ee17d201\Word.dll.
LOG: Assembly is loaded in default load context.
EDIT2:对我来说,它似乎正在寻找Word.dll
中Word.exe
和C:/Program Files (x86)/MSBuild/12.0/bin/
中某个我遗漏的地方。< / p>
*** Assembly Binder Log Entry (27.09.2016 @ 12:56:09) ***
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:\Program Files (x86)\MSBuild\12.0\bin\MSBuild.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = Word, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/MSBuild/12.0/bin/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = MSBuild.exe
Calling assembly : (Unknown).
===
LOG: This is an inspection only bind.
LOG: Using application configuration file: C:\Program Files (x86)\MSBuild\12.0\bin\MSBuild.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/MSBuild/12.0/bin/Word.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/MSBuild/12.0/bin/Word/Word.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/MSBuild/12.0/bin/Word.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/MSBuild/12.0/bin/Word/Word.EXE.
LOG: All probing URLs attempted and failed.