微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

.net – 缺少Embed Interop Type属性

一个C#项目中,我收到以下警告:

warning CS1762: A reference was created to embedded interop assembly ‘Interop.someLibrary.dll’ because of an indirect reference to that assembly created by assembly ‘ALibraryOfmine.dll’. Consider changing the ‘Embed Interop Types’ property on either assembly.

但是,在提供此警告的C#项目中,我没有看到COM库参考属性中的Embed Interop Types属性。在VS 2010中。在VS 2008 ALibraryOfmine项目中,同一个COM库也没有Embed Interop Types属性。如何摆脱这个警告?我已经得到一个“所在的程序集的清单定义与程序集引用不匹配”错误,我担心COM库的不同版本可能在后面,所以我想消除COM相关的错误

解决方法

您需要在参考文献,右键点击和属性中转到Dll。它在那里,而不是你的项目的属性

原文地址:https://www.jb51.cc/css/218219.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。