NMath User's Guide

TOC |  Previous |  Next |  Index

1.3 Building and Deploying NMath Applications (.NET, C#, CSharp, Visual Basic, VB.NET)

The NMath installer places the following .NET assemblies in directory <installdir>/Assemblies:

The installer also place .NET these assemblies in your global assembly cache (GAC). (Note that the 64-bit kernel is only put in the GAC if you have the 64-bit .NET framework installed.) The native DLLs are linked resources to the corresponding kernel assemblies.

Building NMath Application

To use NMath types in your application, add references to NMath.dll and NMathShared.dll. It is not necessary to add references to the kernel assemblies-the appropriate kernel assembly for your platform is loaded at runtime, and the appropriate native DLL is linked to the kernel. The search order is the same as for the common language runtime: first the GAC is searched, then the directory containing the currently executing assembly, and so on.

We recommend that you build your application using the Any CPU build configuration, so you can deploy to either 32-bit or 64-bit environments.

Deploying NMath Applications

To deploy your application, either:

  1. Install the NMath .NET assemblies in the GAC. The appropriate native DLL should accompany the .NET assemblies, since it is a linked resource to the kernel; or
  2. Place all .NET assemblies and native DLLs together in a location in your PATH, or in the same directory as your application.

NMath has a dependency on the Microsoft Visual C++ runtime. The NMath installer places the C++ runtime on your development machine, if necessary. However, when you deploy your application, you may need to add it to your installer. There are two ways to do this:

c:\program files (x86)\common files\mergemodules\microsoft_vc90_crt_x86.msm
or on the web.
http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf

TOC |  Previous |  Next |  Index