使用Visual Studio安装项目以自动注册和GAC一个COM互操作DLL(Use Visual Studio Setup Project to automatically register and GAC a COM Interop DLL)

   IT问题网   2019-08-13 00:00:00

问 题

我创建了一个.net程序集的com互操作,并运作良好的我的机器。目前,我正在试图找出如何部署该dll使用visual studio的一个目标机"安装项目"。如何使用visual studio安装项目做以下的事情:

  • 注册组件(目前使用 regasm )。
    • 的组件需要被成功注册<打击>的类型库(.tlb)需要被成功注册
    • <一个href="http://stackoverflow.com/questions/239465/how-to-register-a-net-ccw-with-regasm-from-a-visual-studio-2008-setup-project/1883517#1883517">this答案表明赞成定制code报废 regasm 。我这是一个好主意吗?如果是的话,请问如何code得到包含在安装项目?
    • <一个href="http://stackoverflow.com/questions/12807/how-to-register-com-from-vs-setup-project/14604#14604">this回答建议使用 regasm 的 / regfile 命令,然后使用导入工具在注册表中安装项目。将这项工作?
  • 在gac中安装的组件(目前使用 gacutil )
    • 我在知道了"全局程序集缓存文件夹"的"目标计算机上的文件系统。"有没有什么特别的,我需要做的,包括装配在安装项目?

任何其他建议或疑问将是非常美联社preciated。

解决方案

的gacutil.exe将无法使用在目标机器上。不是一个问题,微星能够把工作做好。右键单击"文件系统上的目标计算机",添加,gac。用鼠标右键单击添加的文件夹,添加,项目输出。这保证了装配gac-ed。

它也可以注册程序集状regasm.exe一样。项目输出引用的注册属性设置为vsdrpcom。

标签:使用安装项目自动注册以及一个操作



分享:

  • 微信
  • QQ好友
  • QQ空间
  • 新浪微博


热门推荐

如何获得MX记录与System.Net.DNS DNS名称?(How to get mx records for a dns name with System.Net.DNS)

problem is there any built in method in the .net library ...

我为什么要preFER单曲“等待Task.WhenAll”在多个等待着?(Why should I prefer single &#39;await Task.WhenAll&#39; over multiple awaits)

problem in case i don't care about the order ...

我该如何分析和转换日期时间的到RFC 822的日期,时间格式?(How do I parse and convert DateTime’s to the RFC 822 date-time format)

problem how do i convert a datetime structure to its equi ...

有什么区别呢.AsNoTracking()做什么呢?(What difference does .AsNoTracking() make)

problem i have a question regarding the .asnotracking() e ...

实体框架/ LINQ到SQL:跳过和放大器;采取(Entity Framework/Linq to SQL: Skip &amp; Take)

problem just curious as to how skip amp; take are suppose ...

StreamWriter.Flush()和StreamWriter.Close()之间的区别是什么?(What is the difference between StreamWriter.Flush() and StreamWriter.Close())

problem what is the difference in functionality between s ...

现净switch语句散列或索引?(Are .Net switch statements hashed or indexed)

problem does .net 4 (or any prior version) perform any so ...

使用LINQ生成没有选择直接更新(Use linq to generate direct update without select)

problem g'day everyone. i'm still learning l ...

是否有可能拦截控制台输出?(Is it possible to intercept Console output)

problem i call a method, say, fizzbuzz(), over which i ha ...

当使用排序列表 TKEY的,TValue在一个SortedDictionary TKEY的,TValue?(When to use a SortedList&lt;TKey, TValue&gt; over a SortedDictionary&lt;TKey, TValue&gt;)

problem this may appear to be a duplicate of this questio ...

如何初始化列表 T给定的尺寸(相对于容量)?(How to initialize a List&lt;T&gt; to a given size (as opposed to capacity))

problem .net offers a generic list container whose perfor ...

如何使用XPath用的XDocument?(how to use XPath with XDocument)

problem there is a similar question, but it seems that th ...

什么是WebConfigurationManager和ConfigurationManager中的区别?(What&#39;s the difference between the WebConfigurationManager and the ConfigurationManager)

problem what's the difference between the webconfiguratio ...

NUnit的测试运行秩序(NUnit Test Run Order)

problem by default nunit tests run alphabetic ...

如何恢复从C#数据库(How to restore a database from C#)

problem i have a sql 2008 db. i am running a form that ba ...

调用堆栈不说&QUOT;你来自哪里&QUOT;但是&QUOT;你要去哪里,下一个&QUOT;?(The call stack does not say &quot;where you came from&quot;, but &quot;where you are going next&quot;)

problem in a previous question (get object ca ...

如何读取和写入ID3标签在C#中的MP3?(How to read and write ID3 tags to an MP3 in C#)

problem is there a library for reading and writing id3 ta ...

如何设置读取权限的X.509证书从.NET私钥文件(How to set read permission on the private key file of X.509 certificate from .NET)

problem here is the code to add a pfx to the cert store. ...

获取列表视图的项目双击事件(Get the item doubleclick event of listview)

problem how to get the item double click event of listvie ...

MongoDB的交易?(MongoDB transactions)

problem playing around with mongodb and norm in .net. th ...