简体   繁体   English

使用 x64 版本的 Kitware.VTK 时“无法加载文件或程序集 Kitware.VTK”

[英]"Could not load file or assembly Kitware.VTK" when using x64 version of Kitware.VTK

I'm using Kitware.VTK x86 since I started using this library because I've never been able to make the x64 version works.自从我开始使用这个库以来,我一直在使用 Kitware.VTK x86,因为我一直无法使 x64 版本正常工作。 Now I'd like to understand why.现在我想明白为什么。

With the x64 version, as soon as I start using a VTK class, I get the following error:对于 x64 版本,一旦我开始使用 VTK 类,就会收到以下错误:

在此处输入图片说明

Sorry for french langage, the error is simply "Could not load file or assembly Kitware.VTK"抱歉法语,错误只是“无法加载文件或程序集 Kitware.VTK”

Here is the only code I wrote to rise this exception:这是我为引发此异常而编写的唯一代码:

    public MainWindow()
    {
        InitializeComponent();

        RenderWindowControl renderer = new RenderWindowControl();
    }

Again, everything works well with x86 version.同样,在 x86 版本上一切正常。 But I'm starting to have other problems later in my code with this library, so in a fit of despair, I just hope that being able to switch to the x64 version will fix all my problems !但是我稍后在使用这个库的代码中开始遇到其他问题,所以在绝望中,我只希望能够切换到 x64 版本将解决我所有的问题!

Edit :编辑

In the InnerException details there's also this error : "Trying to load an incorrect format program."在 InnerException 详细信息中也有这个错误:“试图加载一个不正确的格式程序。”

Thanks to @sthotakura, I've been looking to the value of the active plateforme of the application, which was set to Any CPU.感谢@sthotakura,我一直在寻找应用程序的活动平台的价值,该平台设置为任何 CPU。 I tried to set it to x64, and it's working well.我尝试将其设置为 x64,并且运行良好。

I still don't understand why I had to do this, but at least it's working..我仍然不明白为什么我必须这样做,但至少它起作用了..

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ActiViz.NET.x64(v5.8.0):无法加载DLL“ Kitware.VTK.vtkFiltering.Unmanaged.dll” - ActiViz.NET.x64 (v5.8.0): Unable to load DLL 'Kitware.VTK.vtkFiltering.Unmanaged.dll' 实例化 vtkCommand 子项时 Kitware VTK Activiz.NET InvalidCastException - Kitware VTK Activiz.NET InvalidCastException when instantiating vtkCommand child 无法加载文件或程序集“ Oracle.DataAccess”(x64) - Could not load file or assembly 'Oracle.DataAccess' (x64) 更改为x64平台时无法加载程序集错误 - Could not load assembly error when changing to x64 platform 无法为 x64 和 x86 加载文件或程序集 'CefSharp.Wpf; 只有一个作品 - Could not load file or assembly 'CefSharp.Wpf for both x64 and x86; only one works 使用Side-by-Side程序集加载DLL的x64或x32版本 - Using Side-by-Side assemblies to load the x64 or x32 version of a DLL 使用编码的 UI 测试时无法加载文件或程序集'WebDriver,版本 = 2.53.1.0 - Could not load file or assembly 'WebDriver, Version=2.53.1.0 when using coded UI Testing 使用vtk调整dicom文件中的窗口级别 - adjust window level in dicom file using vtk 仅当Assembly具有特定版本(x86或x64)时才编译语句 - Compile a statement only if Assembly has specific version (x86 or x64) 无法加载文件或程序集'RevitApi'版本= 19.0.0.0, - Could not load file or assembly 'RevitApi' version = 19.0.0.0,
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM