Microsoft Dynamics 365 Blog

As an ISV, you will want to sign your models so your
customers know who made the models and the models cannot be tampered with. The
steps for strong naming your model and Authenticode signing it are:

  1. Generate a key pair file using Visual Studio’s strong
    naming tool. If you have Visual Studio installed go to Start >
    Programs > Microsoft Visual Studio 2012 > Visual Studio Tools > Visual
    Studio Command Prompt. In the VS command
    prompt enter something like this:
    1. sn.exe –k YourKeyPair.snk
  2. Acquire a signing certificate from a company that issues
    certificates, I believe this also comes with a private key. For more
    information do a Bing search for
    Authenticode signing and you’ll find companies that issue these certificates.
  3. Once you have the certificate open certificate manager by
    going to a Windows command prompt and typing certmgr.msc.
  4. In the certificate manager that opens, go to Trusted Root
    Certification Authorities. In there is a
    Certificates directory, right-click on the Certificates directory and choose
    All Tasks > Import. Go through the wizard to import your certificate.
  5. In AX create your model.
  6. In Windows go to Administrative Tools > Microsoft
    Dynamics AX 2012 Management Shell. Run
    axutil to export the file using the key.
    To do this in the management shell prompt type something like:
    1. axutil export /key:YourKeyPair.snk /file:YourModel.axmodel /model:YourModel
  7. Sign the model using the signtool from VS and the pfx
    file from step #2. Go to Start >
    Programs > Microsoft Visual Studio 2012 > Visual Studio Tools > Visual
    Studio Command Prompt. In the VS command
    prompt enter something like this
    1. signtool sign /f c:\Files\IsvTestCert.pfx /p PasswordForKey c:\Files\YourModel.axmodel
    2. The Sign Tool should return “Successfully signed: c:\Files\YourModel.axmodel
  8. In Windows go to Administrative Tools > Microsoft
    Dynamics AX 2012 Management Shell. Use
    axutil to import the model file. You can
    force it to check the signing so in the command prompt enter something like
    this:
    1. axutil import /file:c:\Files\YourModel.axmodel –forcesigncheckdialogs

There are a couple of different articles you can look at for
more information on this topic. They are:

http://blogs.msdn.com/b/mfp/archive/2009/09/29/introducing-ax-models-part-2.aspx

http://msdn.microsoft.com/en-us/library/hh352314.aspx

We're always looking for feedback and would like to hear from you. Please head to the Dynamics 365 Community to start a discussion, ask questions, and tell us what you think!