Excel的.NET COM - 自动化错误。该系统找不到指定的文件 [英] Excel .NET COM - Automation error. The system cannot find the file specified

查看:269
本文介绍了Excel的.NET COM - 自动化错误。该系统找不到指定的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有在Excel中使用VBA一个.NET 2.0的COM对象。它工作正常,在我的dev的机器,而是尝试使用它干净的虚拟机工作站上,当我得到这个错误:

I have a .NET 2.0 COM object that's used by VBA in Excel. It works fine on my dev machine, but when trying to use it on a clean VM workstation I get this error:

自动化错误。 该系统找不到指定的文件。

Automation error. The system cannot find the file specified.

这个dll被注册regasm / TLB / codeBase的mycom.dll,而不是放在GAC。 我没有在虚拟机中的管理权限

The dll is registered with "regasm /tlb /codebase mycom.dll" and not put in the GAC. I don't have administration rights on the VM box

任何想法?

推荐答案

您需要可以调用regasm的完整路径组件设置为 codeBase的参数值或将组装成某个位置始终是搜索库的路径。否则,当客户端尝试实例化COM对象不会被发现。

You need to either invoke regasm with the full path to the assembly as the codebase parameter value or put the assembly into some location which is always on the path for searching libraries. Otherwise it will not be found when the client tries to instantiate the COM object.

这篇关于Excel的.NET COM - 自动化错误。该系统找不到指定的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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