Registering .NET Component

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • glenn

    #1

    Registering .NET Component

    I have written a COM Server in C# and its working perfectly. I am not ready
    to deploy to client computers to begin the real testing and am now wondering
    how to perform. The part that confuses me is that you can not use regsvr32
    to register the COM server so I'm wondering if placing it inside the .NET
    library will automatically take care of registering it so non managed code
    programs can access it or do I have to manually use the regasm program to
    register it on each computer.

    And if regasm is what I use, then what is the best method since this program
    is not in a windows path and there are different versions of it on most
    computers.

    Thanks,

    glenn


  • Dmytro Lapshyn [MVP]

    #2
    Re: Registering .NET Component

    Hi glenn,

    RegAsm is the right tool, and you have two options:

    a) Deploying the .NET assembly to the GAC and registering it with regasm
    from there. The assembly will need to be strong-named.
    b) Deploying the assembly elsewhere and specifying the /codebase option when
    registering it with RegAsm.

    --
    Sincerely,
    Dmytro Lapshyn [Visual Developer - Visual C# MVP]


    "glenn" <ghancock@softe ksoftware.com> wrote in message
    news:%23lK4TdRU FHA.3056@TK2MSF TNGP14.phx.gbl. ..[color=blue]
    >I have written a COM Server in C# and its working perfectly. I am not
    >ready
    > to deploy to client computers to begin the real testing and am now
    > wondering
    > how to perform. The part that confuses me is that you can not use
    > regsvr32
    > to register the COM server so I'm wondering if placing it inside the .NET
    > library will automatically take care of registering it so non managed code
    > programs can access it or do I have to manually use the regasm program to
    > register it on each computer.
    >
    > And if regasm is what I use, then what is the best method since this
    > program
    > is not in a windows path and there are different versions of it on most
    > computers.
    >
    > Thanks,
    >
    > glenn
    >
    >[/color]

    Comment

    • Dmytro Lapshyn [MVP]

      #3
      Re: Registering .NET Component

      The version corresponding to the version of the Framework your application
      targets.

      --
      Sincerely,
      Dmytro Lapshyn [Visual Developer - Visual C# MVP]\


      "glenn" <ghancock@softe ksoftware.com> wrote in message
      news:uSt3tYXVFH A.3760@TK2MSFTN GP15.phx.gbl...[color=blue]
      > Thanks,
      >
      > However, I'm still stuck as running regasm from inside another program
      > doesn't seem to be working and it is not found in windows path so what
      > version is best to run?
      >
      > Thanks,
      >
      > glenn
      >
      >
      > "Dmytro Lapshyn [MVP]" <x-code@no-spam-please.hotpop.c om> wrote in message
      > news:uFUE11TUFH A.612@TK2MSFTNG P12.phx.gbl...[color=green]
      >> Hi glenn,
      >>
      >> RegAsm is the right tool, and you have two options:
      >>
      >> a) Deploying the .NET assembly to the GAC and registering it with regasm
      >> from there. The assembly will need to be strong-named.
      >> b) Deploying the assembly elsewhere and specifying the /codebase option[/color]
      > when[color=green]
      >> registering it with RegAsm.
      >>
      >> --
      >> Sincerely,
      >> Dmytro Lapshyn [Visual Developer - Visual C# MVP]
      >>
      >>
      >> "glenn" <ghancock@softe ksoftware.com> wrote in message
      >> news:%23lK4TdRU FHA.3056@TK2MSF TNGP14.phx.gbl. ..[color=darkred]
      >> >I have written a COM Server in C# and its working perfectly. I am not
      >> >ready
      >> > to deploy to client computers to begin the real testing and am now
      >> > wondering
      >> > how to perform. The part that confuses me is that you can not use
      >> > regsvr32
      >> > to register the COM server so I'm wondering if placing it inside the[/color][/color]
      > .NET[color=green][color=darkred]
      >> > library will automatically take care of registering it so non managed[/color][/color]
      > code[color=green][color=darkred]
      >> > programs can access it or do I have to manually use the regasm program[/color][/color]
      > to[color=green][color=darkred]
      >> > register it on each computer.
      >> >
      >> > And if regasm is what I use, then what is the best method since this
      >> > program
      >> > is not in a windows path and there are different versions of it on most
      >> > computers.
      >> >
      >> > Thanks,
      >> >
      >> > glenn
      >> >
      >> >[/color]
      >>[/color]
      >
      >[/color]

      Comment

      Working...