【发布时间】:2013-11-01 17:45:40
【问题描述】:
下午好,堆栈交换,
我正在尝试发布我的 Outlook 2013 加载项以供其他人使用。我已经在我的计算机上安装了我的插件,当我单击功能区按钮时,不会加载任何窗口,但它在调试模式下会加载。由于某种原因,现在它似乎在我的 PC 上运行良好,但是当它安装在其他几台计算机上时,它安装并且功能区可见,但是当单击功能区按钮时没有任何反应(一个窗口应该打开)。
我决定下载“AddInSpy”并在我的计算机和其他人的计算机上查看我的应用程序。所有关于我的插件都显示相同的错误:
Add-in DLL path is not found. System.BadImageFormatException: Could not load file or assembly 'file:///C:\Users\Alexander Harvey\Desktop\Addin\Application Files\De_Facto_Addin_1_0_0_12\De_Facto_Addin.dll.deploy' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
File name: 'file:///C:\Users\Alexander Harvey\Desktop\Addin\Application Files\De_Facto_Addin_1_0_0_12\De_Facto_Addin.dll.deploy'
at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, StackCrawlMark& stackMark)
at System.Reflection.Assembly.ReflectionOnlyLoadFrom(String assemblyFile)
at AddInSpy.AssemblyScanner.GetAssemblyInfo(String fileName, String hostName, Boolean isVstoAddIn)
我完全被困在这个问题上,并且已经尝试了 3 个小时来解决问题。所以任何帮助将不胜感激。谢谢你。
【问题讨论】:
-
您是如何安装插件的?使用 ClickOnce?微星安装程序?我也会怀疑 x64/x86 的兼容性。
-
@etaiso ClickOne 使用 AnyCPU 构建配置
-
据我所知,AnyCPU 对您没有帮助,因为 TargetPlatform 只能设置为 x86/x64。更多信息请看这里:stackoverflow.com/questions/753412/…
标签: c# outlook-addin outlook-2013