Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel .NET COM - Automation error. The system cannot find the file specified

Tags:

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.

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

Any ideas?

like image 508
ingt Avatar asked May 19 '09 09:05

ingt


1 Answers

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.

like image 79
sharptooth Avatar answered Sep 25 '22 01:09

sharptooth