web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Import of axmodel-file to Ax7

(0) ShareShare
ReportReport
Posted on by

Hi,


I have just started to work with Ax7, but I have done som development there (Visual Studio on dev-environment).

I am trying to migrate some of the customizations I have done to the UAT environment, but gets an errormessage while running the

following import command:

C:\Packages>F:\AosService\PackagesLocalDirectory\Bin\ModelUtil.exe -import -metadatastorepath=F:\AosService\PackagesLocalDirectory -file="C:\Temp\Ax7Model-Ax7ModelPubl.axmodel"

The errormessage says : "Object reference not set to an instance of an object."

The export is going OK and I am getting the file with the name: "Ax7Model-Ax7ModelPubl.axmodel".

This model only contains one entity (EcoResProductVariantEntity) and compiles with success.

Can anyone help?

Best regards

Bjørn Arne Dybvik

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Joris dG Profile Picture
    17,775 on at

    Hi Bjorn,

    if your UAT environment is a non-demo or non-dev box, then deploying a model there doesn't work. A Model file is essentially a bunch of source code, and source code is not useful for the runtime, you need to compile it first and create a deployable package.

    So, for deploying code to a UAT, you should use the build VM that you are supplied with in the implementation project. There's an alternative to create a deployable package from Visual Studio, but I strongly advise against that - I encourage everyone to use the build VM.

    If you're unsure about the code vs runtime, you should review the training materials on the architecture of AX. If you're a partner, there are great sessions from the technical conference available on the Partner Digital Learning Center (DLC) that explains this change in concepts. Alternatively, I've also created an introduction/comparison with 2012 on this on my personal blog at daxmusings.codecrib.com/.../design-compile-run-intro.html

  • Community Member Profile Picture
    on at

    Hi Joris,

    first of all thank you for your answer.

    Since I've read and tested (with success) to create a deployable package

    and installed it on a UAT-server, I want to ask you a new question.

    The procedure I used was to create the deployable package from Visual Studio on the build vm (dev-environment)

    and then moved the package to the UAT-server where I installed. The procedure I used is founded in this page:

    - ax.help.dynamics.com/.../installing-deployable-package-in-ax7

    Before I started I found the services running on the UAT server with the   AXUpdateInstaller.exe list-command (example AOSService).

    I changed the name of the machine in the DefaultTopologyData.xml and added the services in the ServiceModelList tag in the xml-file.

    Then I run the first and second commands below and verified the runbookid via the command AXUpdateInstaller.exe list.

    Next I run the command number three, four and five. And it all went OK (as far I could see), but I am not able to see that the changes I have

    been migrated to the UAT-environment. I've also restarted server and AOSService. The changes I have done is (amongst others) to  make some of

    the entities visible in OData. I use the url <url to AX7>/data/$metadata to confirm this.

    Is there something I am missing?

    Commands used to install deployable package:

    1.AXUpdateInstaller.exe generate -runbookid="AXtopology" -topologyfile="C:\Users\axlocaladmin\Deployable_packages\AXDeployablePackage20160902\DefaultTopologyData.xml" -servicemodelfile="C:\Users\axlocaladmin\Deployable_packages\AXDeployablePackage20160902\DefaultServiceModelData.xml" -runbookfile="C:\Users\axlocaladmin\Deployable_packages\AXDeployablePackage20160902\Axtopology.xml"

    2.AXUpdateInstaller.exe import -runbookfile="C:\Users\axlocaladmin\Deployable_packages\AXDeployablePackage20160902\Axtopology.xml"

    3.AXUpdateInstaller.exe execute -runbookid="AXtopology"

    (if necessary) AXUpdateInstaller.exe execute -runbookid="AXtopology" -setstepcomplete=6

           (if necessary) AXUpdateInstaller.exe execute -runbookid="AX  topology" -rerunstep=2

    4.AXUpdateInstaller.exe execute -runbookid="AXtopology" -versioncheck=true

    5.AXUpdateInstaller.exe export -runbookid="AXtopology" -runbookfile="C:\Users\axlocaladmin\Deployable_packages\AXDeployablePackage20160902\Axtopology.xml"

    I have started to read through you blog and since my company is a partner I will try (harder) to get access to the learning center.

    Best regards

    Bjørn Arne Dybvik

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans