views:

1957

answers:

2

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?

+1  A: 

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.

sharptooth
I did try using regasm on the full path of the assembly which is located in c:\temp, but still the same error
ingt
Then I guess your best bet is to start ProcessMonitor - http://technet.microsoft.com/ru-ru/sysinternals/bb896645.aspx - and look what file exactly is not found. It could be some dependent assembly you're not at all aware of. Once you know for sure it will be much easier to resolve.
sharptooth
sharptooth, thank you *very* much for this answer. It saved my hide today!
Matthew Talbert
A: 

I don't have administration rights on the VM box

Then how can you run RegAsm?

Gary McGill