.netcomstrongname

Is it possible to register a .net assembly as COM without strong naming it?


Ok, so i know how to strong name an assembly and regasm it, so I can access it from a an ASP page.

By strong naming it, it can be placed in the GAC and thus be easily accessible from an ASP page.

Is it possible to somehow register the assembly without signing it with a strong name and still be able, somehow to access it from the ASP page? I want to do this because we want this .net assembly to be able to reference non-signed assemblies and not be as dependant when updating its referenced assemblies.


Solution

  • You call regasm with the /codebase parameter:

    > regasm.exe /codebase path_to_dll\yourdll.dll
    

    Edit: Sorry this is wrong...
    Just saw in the documentation that your dll has to be strong-named as well :s
    But you don't have to put it in the GAC!
    I don't think you can export a .Net library as COM objects without strong-naming it.

    BUT (see the comments): Apparently the documentation is wrong, as people have done this without strong-naming (I personally haven't as all our com-exposed assemblies are strong-named).