Dynamics AX 2012 Error When Importing Modelstore

by | Updated November 13, 2019 | Dynamics AX

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


Submit a Comment

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

Upcoming Events


06oct10:00 am10:30 amPreview of D365 Business Central Fall Release Features and Functionality

06oct12:00 pm12:30 pmInsider's Guide to New Features Available in the Fall Release of D365 Finance and Supply Chain

07oct11:00 am12:00 pmConfab LIVE with Stoneridge - Dataverse and Dynamics in Review – Let’s Get Technical

13oct12:00 pm12:30 pmWave 2 Release – What’s Coming for Dynamics 365 Sales and Customer Service

21oct11:00 am12:00 pmConfab LIVE with Stoneridge - Dataverse and Dynamics in Review – Let’s Get Functional

26oct(oct 26)9:00 am28(oct 28)5:00 pmStoneridge Connect Leadership and Community Conference


04nov11:00 am12:00 pmConfab LIVE with Stoneridge - Challenging the Development Paradigm

About Stoneridge
Stoneridge Software is a unique Microsoft Gold Partner, with emphasis on partner. With specialties in Microsoft Dynamics 365, Microsoft Dynamics AX, Microsoft Dynamics NAV, Microsoft Dynamics GP and Microsoft Dynamics CRM, we focus on attracting the most knowledgeable experts in the field to our team, and prioritize delivering stellar solutions with maximum impact for your business. At Stoneridge, we are deeply committed to your results. Each engagement is met with a dedicated team, ready to provide thorough, tailored, and expert service. Based in Minnesota, we intentionally “step into your shoes,” wherever you are. We focus on what you care about, and develop trusting, long-term relationships with our clients.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!