views:

117

answers:

2

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.

A: 

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

Of course these assemblies are unique to the application and aren't shared by other apps. Not to say that isn't possible either, you would probably choose a neutral location to copy such dlls to.

AnthonyWJones
+3  A: 

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().

sharptooth