gpt4 book ai didi

c# - Emgu.CV在Windows 7 x64上不起作用

转载 作者:行者123 更新时间:2023-12-02 17:50:13 31 4
gpt4 key购买 nike

我的程序可以在Windows 8 x64中正常工作。但是,当我尝试在装有Windows 7 x64的笔记本电脑上运行它时,我遇到了一些问题。

错误:

A first chance exception of type 'System.ArgumentException' occurred in mscorlib.dll
Additional information: URI formats are not supported.

A first chance exception of type 'System.BadImageFormatException' occurred in Emgu.CV.dll
Additional information: You tried to load the wrong format. (Excluded from the HRESULT: 0x8007000B)

A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
Additional information: Target call threw an exception.

A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
Additional information: Target call threw an exception.

'InzV2.vshost.exe' (CLR v4.0.30319: InzV2.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xaml.resources\v4.0_4.0.0.0_pl_b77a5c561934e089\System.Xaml.resources.dll'. Module was built without symbols.
A first chance exception of type 'System.Xaml.XamlObjectWriterException' occurred in System.Xaml.dll
Additional information:Calling the constructor for the type of „InzV2.MainWindow” compatible with specific binding constraints caused an exception.

A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in PresentationFramework.dll
Additional information: Calling the constructor for the type of „InzV2.MainWindow” compatible with specific binding constraints caused an exception., line number 3, position 9.

An unhandled exception of type 'System.Windows.Markup.XamlParseException' occurred in PresentationFramework.dll
Additional information: Calling the constructor for the type of „InzV2.MainWindow” compatible with specific binding constraints caused an exception., line number 3, position 9.

这个错误看起来像这样:

我正在使用来自Nuget的Emgu.CV库,名为:myEmguCV.Net。

即使我尝试只用以下命令创建新项目:
BackgroundSubtractorMOG2 pMog11 = new BackgroundSubtractorMOG2(0, 80, false);

我有错误..

最佳答案

当非托管程序集是为不同于当前正在编译的.NET代码的平台编译的时,会发生此错误。

例如,如果非托管dll在x86体系结构中,而您尝试将代码编译为x64 .NET运行时,则将出现此类错误。

在您提供的镜像中,您似乎正在尝试将代码编译为x86体系结构,而您的EmguCV非托管.dll可能基于x64。

所以去

项目->属性->生成->选中与非托管dll编译平台相匹配的平台(x86,x64)(在您的情况下,可能为x64)。

关于c# - Emgu.CV在Windows 7 x64上不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23725209/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com