Register a c# class

  • Thread starter Thread starter James
  • Start date Start date
J

James

register it with what? - If you mean that you cannot access the class you
have created then you may want to add a reference to the assembly that
contains the class you require..

James Jenkins
http://www.bandwidthvista.com
 
If you want to add it to the registry for use in COM the look up regasm.exe
Use regasm.exe
heres the help output for starters:

Microsoft (R) .NET Framework Assembly Registration Utility 2.0.50727.42
Copyright (C) Microsoft Corporation 1998-2004. All rights reserved.

Syntax: RegAsm AssemblyName [Options]
Options:
/unregister Unregister types
/tlb[:FileName] Export the assembly to the specified type library
and register it
/regfile[:FileName] Generate a reg file with the specified name
instead of registering the types. This option
cannot be used with the /u or /tlb options
/codebase Set the code base in the registry
/registered Only refer to already registered type libraries
/asmpath:Directory Look for assembly references here
/nologo Prevents RegAsm from displaying logo
/silent Silent mode. Prevents displaying of success messages
/verbose Displays extra information
/? or /help Display this usage message

HTH


Ciaran O'Donnell
 
I have an unmanged code in C++ (COM).
I want to write a c# class which implements the c++ interfaces.
I need that the c# class will be registered in the registry (when I build my
c# project).
 
Hi,
I used regasm, but my c# class is not shown in the registry.
what am I doing wrong ?

Ciaran O''Donnell said:
If you want to add it to the registry for use in COM the look up
regasm.exe
Use regasm.exe
heres the help output for starters:

Microsoft (R) .NET Framework Assembly Registration Utility 2.0.50727.42
Copyright (C) Microsoft Corporation 1998-2004. All rights reserved.

Syntax: RegAsm AssemblyName [Options]
Options:
/unregister Unregister types
/tlb[:FileName] Export the assembly to the specified type library
and register it
/regfile[:FileName] Generate a reg file with the specified name
instead of registering the types. This option
cannot be used with the /u or /tlb options
/codebase Set the code base in the registry
/registered Only refer to already registered type libraries
/asmpath:Directory Look for assembly references here
/nologo Prevents RegAsm from displaying logo
/silent Silent mode. Prevents displaying of success
messages
/verbose Displays extra information
/? or /help Display this usage message

HTH


Ciaran O'Donnell

Yoavo said:
Hi,
How can I register a c# class ?

Yoav.
 
I used regasm, but my c# class is not shown in the registry.
what am I doing wrong ?

Where in the registry are you looking?


Mattias
 
I am looking in HKEY_CLASSES_ROOT
But I also made a search for my class name in the entire registry, and didnt
find it anywere.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top