Thursday, November 1, 2007

Automation Error System cannot find the file specified

You might run it to this problem when you are trying to load a COM exposed .net component from a COM application such as VB. The problem is that the COM is not able to find your component in the registry. Here are some of the resolutions you can try

- Enable Register for COM interop in the project properties window

This use to be enough in .Net 1.1 /VS 2003 to get the component registered. But in .Net 2.0/VS 2005, Microsoft introduced another way to specify the COM visibility. That is by introducing a new attribute [assembly: ComVisible(true)]. Add this attribute to your AssemblyInfo.cs file and recompile the project.

If you are still having the problem, try registering the component explicitly using

regasm c:\abc\abc.dll /tlb

sometimes the /tlb option does the trick.

If this doesn't fix the problem check the version number of the component on which your component depends on. If the components, on which your component depends, are singed with specific key and are of specific version, then your component also need to be signed with the same key and versioned the same. Otherwise you will get the same automation error when loading from the component from a COM client. In .Net2.0 you update the AssemblyInfo.cs to update the version number and sign the component

e.g.

[assembly: AssemblyVersion("x.x.x.x")]
[assembly: AssemblyFileVersion("x.x.x.x")]

[assembly: AssemblyKeyFile(@"your_key.snk")]

Hope this helps.

9 comments:

Anonymous said...

Hi, I log on to your new stuff daily. Your writing style is witty, keep doing what you're doing!

Here is my blog post Pet-Files.Com

Anonymous said...

Hello! I know this is somewhat off topic but I was wondering which blog platform are you
using for this website? I'm getting fed up of Wordpress because I've had issues
with hackers and I'm looking at options for another platform. I would be fantastic if you could point me in the direction of a good platform.

Here is my web page rtg casinos no deposit bonus codes 2013

Anonymous said...

It's really a cool and useful piece of info. I'm glad that you just shared this helpful information with us.
Please stay us informed like this. Thank you for sharing.


My web blog :: sggs.ac.in

Anonymous said...

Hello, I enjoy reading through your article post.
I wanted to write a little comment to support you.

Look at my web page; rtg casino

Anonymous said...

I used to be suggested this web site through my cousin.
I'm not sure whether or not this post is written through him as nobody else understand such special about my problem. You are incredible! Thank you!

Here is my web-site; rtg casino

Anonymous said...

I am regular reader, how are you everybody? This paragraph posted at
this site is actually good.

Stop by my web page :: rtg casino games

Anonymous said...

Quality content is the crucial to be a focus for the visitors to pay a quick
visit the website, that's what this web site is providing.

My web-site :: real time gaming

Anonymous said...

I am not sure where you're getting your information, but good topic. I needs to spend some time learning more or understanding more. Thanks for fantastic information I was looking for this info for my mission.

My page - rtg casino bonus

Anonymous said...

The other day, while I was at work, my cousin stole my iPad and tested
to see if it can survive a 30 foot drop, just so she can be a
youtube sensation. My iPad is now destroyed and she has 83 views.
I know this is totally off topic but I had to share it
with someone!

Also visit my blog post ... usa online casino