Re: Can't register an assembly for COM interop

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




"Joseph Rea, Accord Software"
<JosephReaAccordSoftware@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:83A3CA3C-C941-4907-8167-37251F1975D9@xxxxxxxxxxxxxxxx
>I have created a C# class library project in VS.NET 2003 that handles
> encryption. I have various methods that make calls to different algorithms
> in
> the System.Security.Cryptography namespace. I'm then 'registering my
> project
> for COM interop' so that I can call in from another application via COM.
> On
> my development machine (W2K), all I have to do is compile the class
> library
> with the 'register for COM interop' option on, and then i can access my
> dll
> via COM. However, if I do not use Visual Studio to register my assembly
> and
> use regasm instead, I cannot access the COM objects. Regasm says it
> executes
> successfully and I can see entries in the registry for my classes, but
> still,
> they are not available. I've tried doing the actual registration with
> regasm,
> as well as generating a .reg file and doing it that way, and also using
> the
> /tlb switch (each in different tests), but to no avail. I cannot see what
> I
> am missing or doing wrong when trying to register my assembly. Any
> suggestions/information would be greatly appreciated.
>
> Thanks very much in advance.

If you did not run regasm with the /codebase option, your assembly must
reside in the clients folder or must be installed in the GAC.
So your options are:
1. install the DLL in the same folder as the COM client
2. run Regasm /codebase
3. install the DLL in the GAC using gacutil, or (preferably) through a
deployment project (msi file)
Note that 3 requires your assembly to be strong named, while 2 advises your
assembly to be sn'd.

Willy.



.



Relevant Pages

  • Installing a BHO
    ... I have a BHO that needs to be registered. ... Regasm but for the install I am told I cannot use that method. ... Currently I have my .dll set to register: ...
    (microsoft.public.dotnet.framework.setup)
  • Registering 2005 dll for COM
    ... I am trying to register a 2005 created dll for use with COM. ... In .Net I would install the dll and then use regasm. ...
    (microsoft.public.dotnet.languages.vb)
  • RE: Cannot turn on automatic updates nor use windows update
    ... I couldn't register the "Wuaueng.dll". ... "Install the ActiveX control required to view the website. ... gives me an error message saying that "Windows cannot find 'scf'....". ...
    (microsoft.public.windowsxp.help_and_support)
  • RE: Cannot turn on automatic updates nor use windows update
    ... I couldn't register the "Wuaueng.dll". ... "Install the ActiveX control required to view the website. ... Windows Update Link: ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: How to uninstall vb6 runtime files?
    ... I have tried to install the vb6 runtime files in the manner you suggested. ... ACTION: SystemFile: "C:\WINNT40\SYSTEM32\VB6STKIT.DLL" ... (File currently on disk was already up to date) ...
    (microsoft.public.vb.general.discussion)