Register managed assemblies using COM without using the GAC

I am wondering if it is possible to register assemblies with COM without having to register it with the GAC. We need to deploy some .net libraries that are prone to classic asp using CCW. But deployment is a nightmare.

+5
source share
2 answers

Yeap, use regasm.exewith the key /codebase. When you use regasm.exewithout /codebase, it only writes the assmebly file name to the registry and therefore the .NET runtime cannot find it if the assembly is not in the GAC. Using /codebaseit, he writes the full path, and .NET will be glad to find the assembly when the consumer calls CoCreateInstance().

+5
source

Yes, you can use Regasm on the assembly without being in the GAC. For example, I have mixed ASP and ASP.NET sites with .NET assemblies in the bin folder. Some of them are exposed to COM and are registered in situ from the bin folder.

Of course, these assemblies are unique to the application and are not used by other applications. This is not to say that this is impossible, you would probably choose a neutral place to copy such libraries.

0

All Articles