ClickOnce Deployment

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:

  1. Add NMathKernelx86.dll, NMathKernelx64.dll, nmath_native_x86.dll, nmath_native_x64.dll as files to the project.
  2. Set the Build Action to Content.
  3. Set Copy to Output Directory to Copy Always.
  4. Publish your project, then go to the publish directory\Application Files to verify that these four DLLs have been included.

– Trevor

One thought on “ClickOnce Deployment

  1. Hi!
    I followed your instructions, and also added the NMathStats.dll to my project.
    The files


    are in the Application File directory, but when I start MyPublishedApp.application
    I get the error message:

    “Unable to install or run the application. The application requires that assembly NMathStats version be installed in the Global Assembly Cache (GAC) first.”

    How can I deploy, with NmathStats? Please answer me as quickly as possible, this is quite urgent!
    Thanks a lot!

Leave a Reply

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