您的应用程序中发生了未处理的异常 [英] Unhandled exception has occurred in your application

查看:200
本文介绍了您的应用程序中发生了未处理的异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我有一个vb.net应用程序EXE,可以正常运行并在某些操作中抛出以下异常,例如按钮点击事件。



任何人建议如何修复此异常。



您的申请中发生了未处理的异常。如果单击继续,应用程序将忽略此错误并尝试继续。如果单击退出,应用程序将立即关闭。



无法加载文件或程序集'Microsoft.Office.Interop.Word,version = 12.0.0.0,Culture =中性,PublicKeyToken = 71e9bce111e9429c'或其中一个依赖项。系统找不到指定的文件。





详情继续退出


谢谢。

Hi All,

I have a vb.net application EXE which will run correctly and throwing the below exception in some systems during some operations like button click events.

Any one suggest how to fix this exception.

Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.

Could not load file or assembly 'Microsoft.Office.Interop.Word, version=12.0.0.0, Culture=neutral,PublicKeyToken=71e9bce111e9429c' or one of it's dependencies.The system cannot find the file specified.


Details Continue Quit

Thanks.

推荐答案

我认为错误信息非常明确。机器没有安装Office或安装了不同的版本。确保安装了正确版本的office,以使服务器上存在的程序集版本与应用程序所需的程序集匹配。
I think the error message is quite explanatory. Either the machine does not have Office installed or has a different version installed. Make sure that the correct version of office is installed such that the versions of the assembly present on the server matches with the assembly expected by your application.


使用Microsoft.Office.Interop.Word您需要在计算机上安装Microsoft Office。所以,你不能指望所有的机器都会有这个。更好的选择是采用Office OpenXml方法,该方法不需要在机器上安装Microsoft Office。
To use Microsoft.Office.Interop.Word you need to have Microsoft Office installed on the machine. So, you cannot expect all the machines would have this. Better option is to go for Office OpenXml approach which does not require Microsoft Office installation on the machine.


这篇关于您的应用程序中发生了未处理的异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆