In general, when you deploy an NMath application you want to ensure that all NMath DLLs in the installation Assemblies directory are installed in either the GAC or next to the application. (You can read an overview of NMath deployment in Section 1.7 the NMath User’s Guide.)
ClickOnce automagically tries to determine the appropriate dependencies to deploy. However, since the NMath kernel and native DLLs are not required at compile-time, but are required at run-time, the ClickOnce mechanism fails. The best solution we’ve found is to:
- Add NMathKernelx86.dll, NMathKernelx64.dll, nmath_native_x86.dll, nmath_native_x64.dll as files to the project.
- Set the Build Action to Content.
- Set Copy to Output Directory to Copy Always.
- Publish your project, then go to the publish directory\Application Files to verify that these four DLLs have been included.