I have created a DLL using classlibrary ,but is registering via IDE but it unable to register using regsvr32 .
with reference How do I create an ActiveX control (COM) in C#?
I have created a DLL using classlibrary ,but is registering via IDE but it unable to register using regsvr32 .
with reference How do I create an ActiveX control (COM) in C#?
A .NET assembly is not a native DLL. You can only use regsvr32 on native DLLs that support self-registration.
To register a .NET assembly, you can use regasm instead. You can find it at this path or a similar one:
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe"
However, in an installer the recommended way to register a COM server is to install the required registry entries instead of using regsvr32 or regasm. The Windows Installer documentation about the SelfReg table lists some reasons why that is.
Regasm.exe is used to create COM Callable Wrapper (CCW) around .NET assemblies. .NET managed assemblies(EXEs, DLLs) are different from COM DLLs (which are unmanaged, ie. they interact with the OS directly). So to register an unmanaged DLL you use regsvr32.exe.
But if you have a managed .NET assembly and want you COM components to use it as if it were a COM assembly, then you need to use regasm.exe.