是否可以在不添加注册表项的情况下为 COM 互操作注册 .NET 程序集? [英] Is it possible to register a .NET assembly for COM interop without adding registry entries?

查看:33
本文介绍了是否可以在不添加注册表项的情况下为 COM 互操作注册 .NET 程序集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过单击一次来部署 .NET VSTO 应用程序.作为安装过程的一部分,需要为 COM 互操作注册应用程序的主程序集.我知道这可以通过编写代码来执行REGASM assembly.dll/tlb"来完成,但问题是将安装我的应用程序的目标工作站没有管理权限,因此在尝试注册时 regasm 失败类型库.

我的问题是,当我没有管理访问权限时,如何注册我的 .net 程序集以实现 com 互操作性?

解决方案

您可以使用免注册激活COM组件.我已经在通过单击一次部署的应用程序中使用了它,并且效果很好.以下是一些帮助您入门的链接:

基于 .NET 的组件的免注册激活p>

演练:手动部署 ClickOnce 应用程序

如何:在托管程序集中使用 COM 组件为非托管应用部署 ClickOnce

I am deploying a .NET VSTO application via click once. The application's main assembly needs to be registered for COM interop as part of the installation process. I know that this can be done by writing code to execute "REGASM assembly.dll /tlb", but the problem is that the target workstations that will be installing my application don't have administrative rights, so the regasm fails when trying to register the type library.

My question is, how can I register my .net assembly for com interoperability when I don't have administrative access?

解决方案

You could use registration-free activation of COM components. I have used this in an application deployed via click-once and it worked well. Here are a few links to get you started:

Registration-Free Activation of .NET-Based Components

Walkthrough: Manually Deploying a ClickOnce Application

How To: ClickOnce deployment for unmanaged app with COM component in managed assembly

这篇关于是否可以在不添加注册表项的情况下为 COM 互操作注册 .NET 程序集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆