问题描述
我想知道是否可以在不向 GAC 注册的情况下向 COM 注册程序集.我们需要使用 CCW 部署一些暴露给经典 asp 的 .net 库.但是部署是一场噩梦.
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.
推荐答案
是的,使用 regasm.exe 和 /codebase 键.当您使用 regasm.exe 而不使用 /codebase 时,它只会将程序集的文件名写入注册表,因此 .NET 运行时无法找到它,除非程序集位于GAC.使用 /codebase 它将写入完整路径,当使用者调用 CoCreateInstance() 时,.NET 将很高兴找到程序集.
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().
这篇关于在不使用 GAC 的情况下向 COM 注册托管程序集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)