Solved

Class Library and Type Library registration problems

Posted on 2006-07-05
4
341 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

733 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