我想使用 Accord 库和 AForge 库中的一些东西。但是当我安装它时,我开始收到以下错误:
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'
在这行代码上:
startingPoint = new IntPoint(point.X, point.Y);
如何确保我只使用原始的 AForge DLL?也许有解决方法吗?
我试过了
AForge.IntPoint
但事实证明,Accord 使用相同的命名空间......!
我只需转到项目的引用并删除错误消息中提到的引用即可。 (虽然它显示的是正确的版本,但删除它即可)。
您还需要确保它将旧版本映射到 web.config 中的新版本
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-4.2.2.0" newVersion="4.2.2.0" />
</dependentAssembly>
那里是正确的,但有时它会有所帮助。