为什么.net中引用dll文件属性窗口中的“复制到本地”属性不可用(Why is the Copy Local property for my reference disabled?)
来源:互联网 发布:大学生网络责任感 编辑:程序博客网 时间:2024/04/20 23:38
原文地址:
http://stackoverflow.com/questions/15526491/why-is-the-copy-local-property-for-my-reference-disabled
总结:
在dll文件属性窗口中查看他的“签入互操作类型(Embed Interop Types)”属性是否被设置成true,如果是,
则改为false;
这时再看“复制到本地(Copy Local)”属性就会变为可用;
====
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 •http://msdn.microsoft.com/en-us/library/dd409610.aspx 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
注意:在将“签入互操作类型”变为false后,程序执行上要比以前要明显感觉到慢,所以在具体引用很多com的应用中,要注意。
- 为什么.net中引用dll文件属性窗口中的“复制到本地”属性不可用(Why is the Copy Local property for my reference disabled?)
- property中的copy属性
- 将一个bean中的一些属性copy到另一个bean中(其中这2个bean被拷贝属性名字要相同 否则不拷贝)
- 将MFC dll中的窗口嵌入到工程窗口中
- 为什么用copy for NSString属性?
- C# 编程遇到An object reference is required for the non-static field, method, or property错误
- Why The Future Of Digital Security Is Open(为什么数字安全的未来是开放)
- "Login failed for user 'sa'. Reason: The account is disabled.
- iOS @property中的NSString, NSArray, NSDictionary属性为什么大多时候用copy而不用strong的原因
- C# 不复制到本地(软件当前目录)引用程序集;
- Service部署到服务器后出现"The test form is only available for requests from the local machine"解决方法
- Service部署到服务器后出现"The test form is only available for requests from the local machine"解决方法
- ios中为什么block用copy属性
- 浅析iniit.rc脚本中的service程序不写disabled字段why会自动执行
- 浅析iniit.rc脚本中的service程序不写disabled字段why会自动执行
- 为什么控件的有些属性在代码中可用,但是在设计界面的属性窗口中就没有
- Java中的引用(Reference)
- 同事问到C#中的属性(Property)怎么理解?
- 自定义标签中获取Spring Bean
- javascript之DOM操作
- 堆排序的体会
- IOS给View设置背景图片(代码实现)
- b/s页面传值方法
- 为什么.net中引用dll文件属性窗口中的“复制到本地”属性不可用(Why is the Copy Local property for my reference disabled?)
- 网络连接故障处理六部曲
- 我们之所以觉得自己不快乐,是因为我们追求的不是幸福,而是比别人幸福。
- mysql处理百万级以上的数据时如何提高其查询速度的方法
- 纪念红军慈悲阿娇大幅度年
- Android开发获取开机启动项列表
- python数据结构与算法 26 动态规划
- 黑马程序员—Java API(System类、Runtime类、Math类、Date类)
- Oracle group by 分组,并统计