Migrating an ISV solution from Microsoft Dynamics AX 2012 to D365 Finance and Operations: A practical approach

December 17 2018

In this article we will look at a practical approach to moving an ISV solution from Microsoft Dynamics AX 2012 to Dynamics 365 for Finance and Operations (D365FO) using Life Cycle Services (LCS). LCS offers services and tools that perform some of the work and provide an ISV with the information needed to successfully complete a migration effort.


Before we begin, make sure that AX 2012, together with the ISV solution, is already upgraded to R3 with the latest cumulative update. Next, we need to export the AX model store that contains all ISV code modifications. Once the model store is exported, convert it into a zip file. If you don't already have an LCS account, set one up and access Azure DevOps (formerly known as Visual Studio Team Services, or VSTS), Below is a list of prerequisites:

  1. Upgrade AX 2012 modelstore to R3 and latest cumulative update
  2. Access to LCS
  3. Access Azure DevOps
  4. A D365FO development environment (in our case we will be using a VM deployed in the local environment)

Using code upgrade tool in LCS

Log into LCS. Either create a new project or open an existing project and go to hamburger icon -> code upgrade and the Microsoft code upgrade service dashboard will open. Click on add on lower bottom left to add a new code upgrade job. Give it a name, description and select AX 2012 in Release you are upgrading from dropdown and select the latest version (8.1 as of writing of this article) in release you are upgrading to dropdown. 


 Cost upgrade service_create job

Click on add files to upload a ModelStore as a zip file (you can use WinRAR or Winzip or any other tool to compress it). It will take some time depending upon the size of zip file.

Upload ModelStore zip file

Setup the Azure DevOps project

Since code upgrade service needs to have a project that will contain all the converted objects either through extensions or overlays, before moving forward we will need to setup an Azure DevOps account and project.

Go to visualstudio.com and create a free account. Do remember to use credentials that are linked with your organization (same will be needed for LCS login).

Next, enter your Azure DevOps site (use customer name), choose Team Foundation Version Control option and click Continue.

Setting up contoso365

In our case, the site https://contoso365.visualstudio.com will be created. It contains one default project called: MyFirstproject.

Now we will create a new Azure DevOps project. Click on new project, enter project information and click create.

Create new Azure DevOps project

Make sure to select Team Foundation Version Control as version control and set the work item process to CMMI. Now back to LCS and Go to hamburger icon -> projects settings

LCS project settings

Go to Visual Studio Team Services -> Setup Visual Studio Team Services (Note: LCS has not updated the terminology yet).

Setup VSTS

Next you will see the following screen, enter the Azure DevOps URL that we just created in previous steps and add a personal access token. Following link will guide you how to create a personal access token.


Enter the VSTS site

Next select the Azure DevOps project that we just created in the previous step. Click continue and review and save the changes.

Now go back to code upgrade service and the Azure DevOps project name will appear. Click on analyze code. A large popup window will appear mentioning that it will take time to complete the job. Click proceed. Once the job is done you will see the following screen:


In the past, overlayering was used to upgrade the code, but now that that functionality is deprecated, extensions are the only supported approach going forward. Extensions will need to made separately for standard objects.

Analyzing code upgrade process results

The process provides the following files:

  • Upgraded metadata zip file: This is the upgraded source code file for D365FO that contains XML files for all the AOT elements. It can be used for manual code merge without using TFS.
  • AX7 metadata version: This contains the Dynamics AX version number that the code was upgraded against.
  • Migration summary: The migration summary file lists elements that are successfully upgraded (via extensions or overlayering) or that have conflicts that need to be resolved manually.

Dynamics AX 7 Migration Report

Development environment

Now let's head over to the development environment. We have already downloaded and configured the D365FO VM (Version 8.1 Platform Update 20) on our local machine. On the VM, let's open Visual Studio (run as administrator) to connect to Azure DevOps.

Open Team Explorer and click connect.

Open Team Explorer and connect

On the next window, click on the Servers button. Click Add on the next screen. Enter the Azure DevOps URL on which we have created a project (in the first part of this series). Once you click OK, you will be asked to select the account linked with Azure DevOps.

Select the account linked with Azure DevOps

Select the project that we created earlier. In our case its 'D365 Code upgrade' project.

Select the project created earlier

Now that we have connected to TFS, let's configure the workspace to sync metadata and projects.

Click configure your workspace in Team Explorer.

Configure the workspace to sync metadata

Map Trunk>Main>Metadata and Trunk>Main>Projects node to the following directories and click OK.

Map node to directories

Edit Workspace D365VM

Make sure that metadata is located in packagesLocalDirectory. You will see the message shown below. When you click yes, VSTS project files will be downloaded to your VM. This will take some time.

Metadata located in packagesLocalDirectory

Get progress VSTS files download to VM

Once completed, if you browse through the projects that the process created, you will find these three types of projects:

  1. CodeMergeSolution: You will have to merge your code with the new code in this project.
  2. UnParsableSolution: There are some AX 2012 elements that are not supported in D365FO (like AIF). This solution contains those elements and code that needs to be rewritten.
  3. UpgradedSolution: Some of the code is automatically upgraded by Microsoft. It contains all elements that are upgraded automatically.

If you now open the AOT, you will see some new models that are now added.

New models added to workspace

After the code upgrade, all code changes in AX 2012 should stop. If any changes are made, they must be manually shifted to the new solution.


Upgrading code from LCS helps you to save manual effort. By identifying out of the box code that has been customized as well as new implementations, it will also give you a summary of the controls that have been covered in D365FO as compared to AX 2012, along with a detailed summary of each individual model. Lastly, it will move all customizations on non-standard objects as extensions in a separate model. But it will leave customization on standard objects as they are, which means you will have to deal with them yourself using extensions.

FREE Membership Required to View Full Content:

Become a MemberLogin
Joining MSDynamicsWorld.com gives you free, unlimited access to news, analysis, white papers, case studies, product brochures, and more, and it’s all FREE. You’ll also have the option to receive periodic email newsletters with the latest relevant articles and content updates. Learn more about us here
About Hammad Khan

Hammad Khan is a Microsoft Certified Professional with strong focus on transforming business challenges into solutions using Microsoft technologies. He currently works as a Technical Consultant at AXPulse, responsible for development and customization in Microsoft Dynamics AX 2012 and Microsoft Dynamics 365 Finance and Operations. He is also responsible for migrating solutions from Microsoft Dynamics AX 2012 to Microsoft Dynamics 365 Finance and Operations along with the integration of various 3rd party applications for Microsoft Dynamics ERP.

More about Hammad Khan