该类型存在于两个DLL中

编程入门 行业动态 更新时间:2024-10-28 14:27:57
本文介绍了该类型存在于两个DLL中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想使用Accord库和AForge库中的内容。但是当我安装它时,我开始出现以下错误:

错误CS0433 类型'IntPoint'存在于'AForge,Version = 2.2.5.0,Culture = neutral,PublicKeyToken = c1db6ff4eaa06aeb'和'Accord,Version = 3.0.2.0,Culture = neutral,PublicKeyToken = fa1a88e29555ccf7'

在此代码行上:

startingPoint = new IntPoint(point.X,point.Y);

如何确保仅为此使用原始AForge DLL?

我尝试过

AForge.IntPoint

但事实证明,雅阁使用了相同的命名空间...!

解决方案

打开项目的参考文献,右键单击违规者,然后选择属性。 / p>

将别名更改为自定义名称:

然后,只要您希望在自己的参考信息中使用代码,只需将其插入文件顶部即可。

extern alias MyAlias;

I wanted to use something from Accord library as well as the AForge library. But when I installed it, I started getting the following error:

Error CS0433 The type 'IntPoint' exists in both 'AForge, Version=2.2.5.0, Culture=neutral, PublicKeyToken=c1db6ff4eaa06aeb' and 'Accord, Version=3.0.2.0, Culture=neutral, PublicKeyToken=fa1a88e29555ccf7'

On this line of code:

startingPoint = new IntPoint(point.X, point.Y);

How can I ensure that I only use the original AForge DLL for this? Is there perhaps a workaround?

I tried

AForge.IntPoint

but as it turns out, Accord uses the same namespace...!

解决方案

Open up your project's References, right-click on the offender, and select Properties.

Change your Aliases to a custom name:

Then whenever you wish to use your offending reference in your code, simply insert this at the top of your file:

extern alias MyAlias;

更多推荐

该类型存在于两个DLL中

本文发布于:2023-11-04 10:02:54,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1557625.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:两个   类型   DLL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!