1

在构建我的应用程序时,我经常喜欢将 SharpDevelop 中的“处理异常时暂停”选项设置为 true(我知道 Visual Studio 有类似的标志)。

然而,似乎 ExcelDNA 在 Excel 启动时抛出了很多异常(这些异常被捕获,因此在生产中没有问题)。

这意味着每次我想有效地调试我的程序时,我都需要先关闭这个标志,然后在 excel 完成启动后再次打开它。

有没有办法解决?

例如,第一个例外是:

System.IO.FileNotFoundException:无法加载文件或程序集“ExcelDna.Loader”或其依赖项之一。该系统找不到指定的文件。在静态 RuntimeAssembly System.Reflection.RuntimeAssembly.nLoad(System.Reflection.AssemblyName fileName, System.String codeBase, System.Security.Policy.Evidence assemblySecurity, System.Reflection.RuntimeAssembly locationHint, System.Threading.StackCrawlMark stackMark, System.Boolean throwOnFileNotFound , System.Boolean for Introspection, System.Boolean suppressSecurityChecks) 在静态 RuntimeAssembly System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(System.Reflection.AssemblyName assemblyRef, System.Security.Policy.Evidence assemblySecurity, System.Threading.StackCrawlMark stackMark, System.Boolean for Introspection,系统。

4

0 回答 0