.netcomasp-classiccom-interopccw

Register managed assemblies with COM without using the GAC


I'm wondering if it possible to register assemblies with COM without having to register it with the GAC. We need to deploy some .net libraries that are exposed to classic asp using a CCW. But deployments are a nightmare.


Solution

  • Yeap, use regasm.exe with /codebase key for that. When you use regasm.exe without /codebase it only writes the filename of the assmebly to the registry and so the .NET runtime can't find it unless the assembly is in the GAC. With /codebase it will write the full path and .NET will be happy to find the assembly when the consumer calls CoCreateInstance().