"Any CPU" should be running as a 64-bit process if you're on a 64-bit
operating system. If you run it on a 32-bit operating system, however, it
will run in 32-bit mode. If you want to demand it run as a 64-bit process,
compile it with x64. Then it will refuse to run on a 32-bit OS (which is
just as well, since it won't know how to load the 64-bit .NET DLL).

In an ideal world the HDF5DotNet library would be written as AnyCPU so that
it could work in either mode, but I'm not sure how that would work.

On my project we have created our own thin wrappers using C# that allow us
to run HDF in either architecture, but we only use a few functions and so
this was no great effort. Maintaining our own wrappers would be onerous if
we had to duplicate more functionality. I think there have been discussions
here over the last few weeks about how to better package/approach the .NET
wrappers.

On Tue, Aug 24, 2010 at 2:10 PM, elisa sibarani <[email protected]> wrote:

> Hi Sebastian,
>
> I already compile the HDF5DotNet library in x64 and my application refers
> to that x64 DLL, but is it necessary that my application must also in x64 as
> well? I already checked my application, I made the 'Any CPU' as the
> platform. So then, does it cause the problem?
>
> Thanks
>
> Regards,
> Elisa
>
> --- On *Tue, 8/24/10, Sebastian Good 
> <[email protected]>*wrote:
>
>
> From: Sebastian Good <[email protected]>
> Subject: Re: [Hdf-forum] Problem: could not load file or assembly
> 'HDF5DotNet' or one of its dependencies
> To: "HDF Users Discussion List" <[email protected]>
> Date: Tuesday, August 24, 2010, 3:01 PM
>
>
> Is it possible you're attempting to reference the x86 (32-bit) build of the
> HDF5DotNet assembly from your x64 process? Or vice versa?
>
> On Tue, Aug 24, 2010 at 4:49 AM, elisa sibarani 
> <[email protected]<http://mc/[email protected]>
> > wrote:
>
> Hi All,
>
> I'm trying to execute my application in X64 windows, and I already compile
> the DLL library in x64 and add references to the new DLL. But the problem is
> always come up:
>
> Could not load file or assembly 'HDF5DotNet, Version=1.8.5.1,
> Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt
> was made to load a program with an incorrect format.
>
> How I can deal with this problem? I really need help.
>
> Thanks.
>
> Regards,
> Elisa MS
>
>
> _______________________________________________
> Hdf-forum is for HDF software users discussion.
> [email protected] <http://mc/[email protected]>
> http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
>
>
>
>
> --
> *Sebastian Good*
>
>
>
> -----Inline Attachment Follows-----
>
>
> _______________________________________________
> Hdf-forum is for HDF software users discussion.
> [email protected] <http://mc/[email protected]>
> http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
>
>
>
> _______________________________________________
> Hdf-forum is for HDF software users discussion.
> [email protected]
> http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
>
>


-- 
*Sebastian Good*
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Reply via email to