Dynamics AX 2012 Error When Importing Modelstore

By Jackie Olson | April 24, 2019

When importing model files from an ISV or another vendor you may trigger an error within Dynamics AX.

We recently faced this error in Dynamics AX 2012 when importing modelstore  while working on a client account:

ERROR: Could not load file or assembly ‘C:\TEMP\demo1.axmodel’ or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

This is a common error and the solution can vary depending on your current environment. In this blog, we have compiled links to a variety of sources that we have found helpful to resolve this issue.

Microsoft employee Anup Shah wrote a blog on how to import model files using Export-AXModel. Using Powershell Version 2 as the blog recommends works in some cases, but not all. This is due to newer .Net being used when building the axmodel file instead of .NET 2.0 as explained here.

Here is a possible way of changing the RunTime version of the model file to 2.0, so you can import the model.

If the two above solutions do not work, you can follow the steps below to resolve the issue:

1.Download the iLSpy application.

Use iLSpy to see the .Net version used when the Axmodel file was built. This is optional and only if you are curious! This link will give you the ILSpy executable file.

Once downloaded, unzip it to a folder.  In the folder you extracted the files to, you will them see the ILspy.exe file.  This is the only file you need to launch the ILSpy application. Double click on ilSpy.exe to launch the application. In the ILSpy application, browse to your Axmodel file. You will then see the Runtime version is something other than 2.0 – like shown here – https://daxmusings.codecrib.com/2012/05/axutillibdll-issue-with-net-4.html

2. Download the ILMerge msi file using this link.

Then follow these steps (per the blog) to fix the issue –

Once downloaded and installed (it installs to C:\Program files (x86)\Microsoft\ILMerge) you can change the target version from the command prompt, like this:

ILMerge mymodel.axmodel /targetplatform:2.0 /out:mynewmodel.axmodel

You should now be able to import the new model into Dynamics AX.

If you need assistance or have any other questions, please reach out to the AX team at Stoneridge Software.

Related Posts

Recommended Reading:

Manage U.S. Use Tax on Purchase Orders in Dynamics 365 Finance and Operations

  Managing sales tax requirements on your business purchase can be complicated, but Dynamics 365 Finance and Operations can help […]

Read the Article
5.19.22 Dynamics CRM

How to Write a Great Support Ticket in the Stoneridge Support Portal

Submitting a support ticket through the Stoneridge Support Portal is a quick and effective way to get assistance for any […]

Read the Article

Managing Your Business Through Uncertain Times Using Dynamics 365 Finance and Operations

  Dynamics 365 Finance and Operations (F&O) can help you make informed decisions on how to move your business forward. […]

Read the Article
5.13.22 Power Platform

Using Power BI Object Level Security

  The following article will demonstrate how to use Power BI Object Level Security to disable column data based on […]

Read the Article
5.12.22 Dynamics CRM

How to Use the Stoneridge Support Portal

Stoneridge Software’s support portal is an intuitive and useful function that makes it easy for you to access resources to […]

Read the Article
5.6.22 Dynamics GP

Dynamics GP Transaction Removal: Purchase Orders

  Are you having performance issues with Purchase Orders?  Do you find that there are old Purchase Orders on your […]

Read the Article
5.5.22 Dynamics GP

The Real Story about the Long-Term Future of Dynamics GP Support

I’ve seen a number of people put forward comment that Dynamics GP is going away and you have to get […]

Read the Article

New Features in Dynamics 365 Business Central 2022 Wave 1 Release – Financial Enhancements

The Dynamics 365 Businses Central 2022 Wave 1 Release has a lot of new and exciting features to help your […]

Read the Article
4.29.22 Dynamics GP

Dynamics GP Transaction Removals: Bank Reconciliation

  This is part 2 of a 3 part series on Dynamics GP Transaction Removals. These quick tips will hopefully […]

Read the Article

Start the Conversation

It’s our mission to help clients win. We’d love to talk to you about the right business solutions to help you achieve your goals.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!