1

I have created an excel plug-in in C#. It uses C++ dll native code using dllimport. It works fine on my local machine. Now I want to use it @ another PC/client PC. I have tried regasm also. I registered succesfully like below:

C:\windows\system32>C:\Windows\Microsoft.NET\Framework64\v4.0.30319\regasm /code
base C:\Users\ggirgup\Desktop\CsharpDllcallingCPPDll.dll
Microsoft .NET Framework Assembly Registration Utility version 4.0.30319.17929
for Microsoft .NET Framework version 4.0.30319.17929
Copyright (C) Microsoft Corporation.  All rights reserved.

RegAsm : warning RA0000 : Registering an unsigned assembly with /codebase can ca
use your assembly to interfere with other applications that may be installed on
the same computer. The /codebase switch is intended to be used only with signed
assemblies. Please give your assembly a strong name and re-register it.
Types registered successfully

But When I open excel, It is not shown there in plug-ins. So how can I use this C# dll as excel-plugin in another PC?

Thanks in advance SO!

Girish Gupta
  • 1,241
  • 13
  • 27

1 Answers1

0

What plug-in window are you looking at? Just to make sure we are talking about the right one, go to the Developer tab on the Ribbon (if this isn't visible go to Excel Options -> Popular and check "Show Developer tab in the ribbon") and click the "Visual Basic" item on the far left. Once the VB Developer window opens, go to Tools -> References. This will open all the available references. If you don't see yours then you will have to hit "Browse" to get to it. I used the /tlb option with regasm and browsed to the .tlb file outputted by regasm and added that as a reference and it worked for me. Not sure if it would work without the TLB, but I don't see why not.

Ian
  • 4,169
  • 3
  • 37
  • 62