可视化工作室复制dll refrences到输出文件夹 [英] visual studio copy dll refrences to output folder

查看:111
本文介绍了可视化工作室复制dll refrences到输出文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试扩展某个应用程序。我正在使用与该应用程序捆绑在一起的DLL来扩展其功能。我正在使用visual studio 2010快递版。我添加了对dll库的引用。在参考属性中,选项复制本地被禁用(灰色)为什么是这样?我想要visual studio将dll复制到我的发行文件夹。如果这不能完成,那么有没有办法捆绑dll?

解决方案

你对汉斯回答的评论表明这是一个COM程序集,并且您正在使用Visual Studio 2010.



这意味着可能会将嵌入式互操作类型设置设置为true。这具有将COM组件链接到二进制文件中的功能,可以完全部署它。以下链接有更详细的解释





如果你想部署它,然后需要执行以下




  • 点击参考标签

  • 点击F4打开属性网格

  • 将嵌入互操作类型设置为False(这将取消复制本地)

  • 将复制本地设置为true


I am trying to extend a certain application. I am using a DLL which comes bundled with that application to extend its functionality. I am using visual studio 2010 express edition. I added a reference to the dll library. In the refrence properties the option "Copy local" is disabled.(greyed out) why is that? I want visual studio to copy the dll to my release folder. If this can't be done is there anothter way to bundle the dll?

解决方案

Your comment to Hans answer indicates this is a COM assembly and that you are using Visual Studio 2010.

This means the assembly reference was likely added with the "Embed Interop Types" setting set to true. This has the effect of linking the COM assembly into your binary removing the need to deploy it altogether. The following link has a more detailed explanation

If you do want to deploy it though then will need to do the following

  • Click on the reference in the references tab
  • Hit F4 to bring up the properties grid
  • Set "Embed Interop Types" to False (this will ungray Copy Local)
  • Set "Copy Local" to true

这篇关于可视化工作室复制dll refrences到输出文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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