Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Class Library and Type Library registration problems

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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
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, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

650 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