Solved

What do I need to do to deploy a .NET COM Interop DLL for MS Office?

Posted on 2008-06-10
2
841 Views
Last Modified: 2013-11-17
I have written a .NET DLL (in C#)  that handles some advanced mathematics; some of the classes/methods are exposed to COM. To make use of this I have developed an Excel Add-In that instantiates the classes and calls the methods.

This works perfectly on my development machine, so I set about creating an installer using NSIS in order to deploy and register the DLL and add-in. This too works successfully, but, and here's inlies the problem; only for other development machines i.e. those with VS2005 installed.

To test the theory I took a standard build company laptop, installed the DLL and XLA and tested the example excel docs. This generated run-time errors. I unistalled the DLL and XLA, installed VS2005 and reinstalled the DLL and XLA, on testing the new setup there are no run-time errors and the process' complete successfully.

I suspect that this has something to do with the primary interop references used by the .NET DLL (Microsoft.Office.Interop.Excel), and whilst I have found plenty of reference to this sort of problem on the web, none provide any answers. If anyone can suggest what might be causing this it would be much appreciated.

FYI My .NET assembly (DLL) is not strong-named, as it has dependent assemblies which are also not strong-named, and it does not need to be installed in the GAC. The installer registers the DLL using regasm with the /codebase and /tlb flags, this creates the correct entries in the registry root HKCR.
0
Comment
Question by:ScottRogersGC
2 Comments
 
LVL 24

Expert Comment

by:fridom
ID: 21752363
You have to check the proper C runtime library, which is not installed by default for that some merge modules are somewhere on the Microsoft pages, and you need the .NET runtime stuff also. If you'd use the setup wizard for the COM add in then the Interop stuff is added properly. Howerver you've to chekck the .NET runtime stuff at least. Maybe you can try installing it on a separate machine and see if that "solves" that problem.

Regards
Friedrich
0
 

Accepted Solution

by:
ScottRogersGC earned 0 total points
ID: 21759068
solved it... as suspected there was a component that was part of the VS2005 install that needed to be installed to get the Excel PIA to work, which was the Visual Studio 2005 Tools for Office runtime.

Visual Studio 2005 Tools for Office runtime is available as a redistributable file called vstor.exe
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

743 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now