Good Afternoon Stack Exchange,
我正在尝试发布我的Outlook 2013加载项供其他人使用。我已经在我的计算机上安装了我的插件,并且当我单击一个功能区按钮时,没有窗口会加载,但它在调试模式下完成。出于某种原因,现在它似乎在我的电脑上正常工作,但是当它安装在其他几个人的计算机上时,它安装并且功能区是可见的,但是当点击功能区按钮时没有任何事情发生(窗口打算打开)。
我决定下载“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小时的修复。所以任何帮助将不胜感激。谢谢。
答案 0 :(得分:1)
您应该尝试使用日志记录。这意味着您将能够确定您的问题。
我建议使用Log4Net并在启动时在每一行添加日志输出。
我遇到了类似的问题,这就是我解决的问题,最后只是一个愚蠢的拼写错误:P