How to import project from one model to another (D365FO)

Hello,  Imagine a situation when you have a project that you developed in your own environment in some model. Then you need to import your project into another machine into a certain model (such design rules or something else that forces you to do this).
And then we do not know how to do it, because if we use the standard import method, then our project will load into the source model, and if it does not exist, then it will create it.
There are two ways to get out of this situation:
  1. Download the project in a standard way, and then create a project in the model you want and duplicate all the elements from AOT that were in the imported project in your project. Well, then delete the elements and the project that you imported, Build, Sync and rename duplicate elements 
  2. Move metadata items.
Imagine what we need to export project1 from "Model 1" to "Model2".
  • Export the project from one system.  
  • Import the project into another system.  
  • Go to the ...AOSService \ PackagesLocalDirectory \ "Model 1" \ folder and move the metadata of the items to the same directory for "Model 2".  
  • Go to the ...AOSService \ PackagesLocalDirectory \ "Model 1" \ XppMetadata \ "Model 1" \ folder and move the metadata of items to a similar directory for "Model 2".
Now you need to set up a new project. Open the VS and create a new project in "Model 2".
  • Go to the folder of the new project and find the .rnrproj file. The same file is found in the folder of the imported project. And then we set up our project, that is, we tied the moved elements to it. Example:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="">
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
    <Folder Include="Classes\" />
    <Folder Include="Forms\" />
    <Folder Include="Service Groups\" />
    <Folder Include="Services\" />
    <Folder Include="Tables\" />
    <Content Include="AxClass\StartupClass">
    <Reference Include="Newtonsoft, Version=, Culture=neutral, PublicKeyToken=null">
      <HintPath>C:\Users\Administrator\Documents\Visual Studio 2015\Projects\Newtonsoft\Newtonsoft\bin\Debug\Newtonsoft.dll</HintPath>
  <Import Project="$(MSBuildBinPath)\Microsoft.Common.targets" />
  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Dynamics\AX\Microsoft.Dynamics.Framework.Tools.BuildTasks.targets" />

Usually, in this file, most of the settings are given by the project, the only thing you need to change is to copy the block  <ItemGroup><Folder> <ItemGroup><Content> and  <ItemGroup><Reference>. After that, you can delete the imported project.
  • Open your new project in VS. Build and Sync it.
That's all. I would very appreciate some information about the logical explanation of how the metadata are placed in the file system in D365FO. Thanks



About is free platform that allows you to quickly store and reuse snippets, notes, articles related to Dynamics AX.

Authors are allowed to set their own AdSense units.
Join us.

Blog Tags