?
Solved

Class Library and Type Library registration problems

Posted on 2006-07-05
4
Medium Priority
?
345 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

Technology Partners: 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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
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
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month10 days, 6 hours left to enroll

762 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