c# automation error the system cannot find the file specified
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of
Automation Error The System Cannot Find The File Specified Vbathis site About Us Learn more about Stack Overflow the company Business Learn automation error the system cannot find the file specified tlb more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question ms access automation error. the system cannot find the file specified x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Excel
Regasm Codebase.NET COM - Automation error. The system cannot find the file specified up vote 13 down vote favorite 1 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.
Automation Error In VbaThe 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? .net excel com automation share|improve this question asked May 19 '09 at 9:18 ingt 91124 add a comment| 4 Answers 4 active oldest votes up vote 11 down vote 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. share|improve this answer answered May 19 '09 at 12:09 sharptooth 109k50316704 I did try using regasm on the full path of the assembly which is located in c:\temp, but still the same error –ingt May 19 '09 at 14:07 1 Then I guess your best bet is to start ProcessMonitor - 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
SQL Server 2014 Express resources Windows Server 2012 resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft Imagine Microsoft Student Partners ISV Startups TechRewards Events Community Magazine Forums Blogs Channel 9 Documentation APIs and reference Dev centers Retired content Samples regasm tlb We’re sorry. The content you requested has been removed. You’ll be auto redirected in
Regasm Unregister1 second. Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered run time error '-2147024894' by: error -2147024894 (80070002) Automation Error Archived Forums V > Visual Basic Interop and Upgrade Question 0 Sign in to vote hi guys, this too is in relation to this thread.i'm having problems running http://stackoverflow.com/questions/881750/excel-net-com-automation-error-the-system-cannot-find-the-file-specified the vb6 app, and the error occurs when i make the form show. i've followed the instructions from the help file and still the problem arises everytime.here's another weird thing, when i added the interop form to an existing vb6 application, it was ok when run inside the ide. when i compiled this to an .exe file, the error happened. i also tried creating fresh vb6 app and https://social.msdn.microsoft.com/Forums/en-US/7c5c16d7-4029-4b6f-9a29-55a1c27718b5/error-2147024894-80070002-automation-error?forum=vbinterop it worked, so any ideas on this issue? thanks.dave. Wednesday, August 29, 2007 3:09 AM Answers 0 Sign in to vote Hi Dave, When you ran it as an .exe file did you have your .NET Dll in the same directory? On a target machine you need to run regasm (with /codebase if you want a relative path). If you have a dependency on stdole.dll, do you have that in the GAC? (If you don't have it referenced in your .NET project then don't worry about this one). Hope that helps, let me know if you're still having issues with it. Jonathan Friday, August 31, 2007 9:33 PM Moderator All replies 0 Sign in to vote Hi Dave, When you ran it as an .exe file did you have your .NET Dll in the same directory? On a target machine you need to run regasm (with /codebase if you want a relative path). If you have a dependency on stdole.dll, do you have that in the GAC? (If you don't have it referenced in your .NET project then don't worry about this one). Hope that helps, let me know if you're still having issues with it. Jonathan Fri
tips & solutions from a community of 418,461 IT Pros & Developers. It's quick & easy. Interop call P: n/a Tim I have a vb6 Exe. I need to call a C# dll's methods from the VB Exe. I have used RegAsm to register https://bytes.com/topic/c-sharp/answers/438152-interop-call the C# dll. If the VB6 Exe and the C# dll are in the same folder, then http://www.vbforums.com/showthread.php?561154-COM-interop-automation-err-in-VB6-Dev-environ everything is fine. But I want to place them in different folders. When I place the VB6 Exe in a folder called 'A' and the C# dll in a folder called 'B', the VB6 Exe throws the following error when it tries to invoke the c# dll's method. -2147024894 - Automation error. The system cannot find the file specified. What do I have to do to make it work? automation error Dec 22 '05 #1 Post Reply Share this Question 6 Replies P: n/a Vadym Stetsyak Put the asm in the new folder and reregister it. When you register dll, actually you register a COM component ( VB6 sees your dll as a COM ). Registration means that appropriate aliases a placed to the windows registry. You can think of alias as GUID <-> assembly path. -- Vadym Stetsyak aka Vadmyst http://vadmyst.blogspot.com "Tim"
in VB6 Dev environ If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 7 of 7 Thread: COM interop; automation err in VB6 Dev environ Tweet Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Mar 10th, 2009,06:34 PM #1 KeyNoteSteve View Profile View Forum Posts Thread Starter New Member Join Date Jan 2008 Posts 6 COM interop; automation err in VB6 Dev environ I have written a vb.net (VS2008) .dll sample. I have built these with the swithes for 'COM Interop'. I move this DLL from my VS2008 machine to my VB6 dev machine; run regasm xxx /tlb; and then write a little sample program to test the DLL. The significant parts of the program program are: ------------------------------------------ << reference is added to the dll>> Public M10 As Mar10Class.Mar10Class Private Sub cmdMar10Class_Click() Set M10 = New Mar10Class.Mar10Class M10.HelloMsg ("Mar10 class Msg from VB6 ") End Sub --------------------------------------- If I compile the program, it behaves as expected, but if I try to run it in the dev environment, it gets Automation error The system cannot find the specified file The error happens on line "Set M10 = New Mar10Class....." I have thried this with 4 test dlls. The first one I wrote works in both the comile and dev mod. All others only work in compile mode. I moved one of the test projects to another machine that had the VB6 dev environment and on that machine none worked in the dev environ (and all worked when compiled). I can't see anything in the .net source