Solved

Class Library and Type Library registration problems

Posted on 2006-07-05
4
343 Views
Last Modified: 2008-07-03
I have written a c# COM component as a dll to automate and external applcation using Visual Studio 2005.
It works well on my development machine in VBscript using CreateObject(.....) and in VBA if I reference the dll.

I created an installation project and used this to install the code onto a new machine.

In VBA everything works OK but using VbScript I get and error 8070002 File not found error when I use CreateObject(......).

I suspect that there is something wrong with the registration of the Type Library but comparisons of the registries doesn't show anything different.

Clearly I have done something incorrect with the installation project but for the life of me I can't see where to go from here.

Hope soemone can help

Regards
Andy
0
Comment
Question by:ieg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17044636
Andy,

What are you using for the ProgID for CreateObject?

Bob
0
 

Author Comment

by:ieg
ID: 17071202
TheLearnedOne -thanks for replying.
I managed to fix the problem but like so many issues it wasn't straight forward and the history of the COM component played a roll.
Some relevant history - the COM component automates Crystal Viewer and was originally written in VS2003. Issues over version numbers of the .Net Framework and Crystal meant that I had to upgrade to VS2005, .Net Framework 2.0 and Crystal XI SP2.

The problem with the Type Library turned out to be the fact that I hadn't allocated a GUID to the assembly (Thanks to TheLearnedOne here). Allocating a GUID in Properties/Application/Application Assembly meant that the Type Library was detected as a dependency in the setup program. COM components created in VS2005 seem to have the GUID set automaticaly but in VS2003 that wasn't the case.

However this didn't solve the 8070002 problem - clearly I had 2 issues. It transpired that I was using the wrong Crystal Viewer. The VS2003 project was refering to componenets in C:\Program Files\Common Files\Business Objects\2.7 but Crystal XI uses C:\Program Files\Common Files\Business Objects\3.0. and beacuse the new PC I was installing on had only ever had Crystal XI on - this is what the 8070002 problem was. The toolbox of the project was also referencing the incorrect components.
I removed the references from the toolbox menu, added the correct ones, removed the controls from the form and readded them and it all worked.


I'd like TheLearnedOne to get the points but this post to be flagged as the answer.
Thanks
Andy
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 17074491
Closed, 500 points refunded.
Netminder
Site Admin
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question