Platform configurations x86, x64

NMath 4.0

Due to the increasing prevalence of 64bit operating systems, NMath 4.0 has been re-architected to generate executables that can run on 32-bit or 64-bit platforms with one build. When building simple choose the ‘Any CPU’ configuration, and the resulting application can be redistributed on both 64-bit or 32-bit platforms with no changes.

NMath Versions Prior to 4.0

An NMath application targeting a 32-bit operating system should be built using the “x86” platform configuration in Visual Studio. The resulting application should ship with the 32-bit NMath assemblies found in “Assemblies”. Please note that this application will also run on a 64-bit operating system.

To harness the full capabilities of a 64-bit operating system, build your application using the “x64” platform configuration and deploy with the 64-bit NMath assemblies in “Assemblies/x64”. The resulting application will not run on a 32-bit operating system.

Using the “Any CPU” platform configuration causes .NET to choose a 64-bit application on a 64-bit operating system and a 32-bit application on a 32-bit operating system. This could result in a BadImageFormatException when NMath is loaded.

– Trevor & Paul

.NET 4.5

Please note that there has been a change with Visual Studio 2012 and .NET 4.5. If you are building for .NET 4.5 or higher, also ensure that the Prefer 32-bit flag is unchecked, under Build | Platform target in your project properties.

– Trevor

Leave a Reply

Your email address will not be published. Required fields are marked *

Top