27 February 2014

CU7 AXBUILD

AXBuild.exe needs to be executed with hot-swap disabled!!! So always check your Server configuration and change it if necessary.

I also recognised issues when running axbuild with a user that has insuficient rights. So kkep in mind to run it in a command prompt as an administrator.

cd "c:\Program Files\Microsoft Dynamics AX\60\Server\AX2012R2\bin"

Axbuild.exe xppcompileall /aos=01 /log="E:\log" /altbin="C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin" /compiler="C:\Program Files\Microsoft Dynamics AX\60\Server\AX2012R2\bin\ax32serv.exe"

Import AX model into baseline db

i was wondering if there is a way to import a model into the baseline database instead of moving AOD files into the baseline database. I was looking for an axutil Parameter but there is non. It's even easier, you just need to define the baseline as the target database. Thats it!

cd "C:\Program Files\Microsoft Dynamics AX\60\Server\AX2012R2\bin"
axutil import /file:e:\my.axmodel /db:AX2012R2Baseline /s:MYSQLSERVER /createparents

25 February 2014

Error 351 when generating full CIL

Lately I had Problems with a newly installed AX 2012 R2 CU7 after compiling with AXBuild I tried to do a full CIL Generation.
This allways results in the following error code 351:

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index at
System.Collections.Generic.List'1.get_Item(Int32 index) at Microsoft.Dynamics.Ax.Xpp.ILGenerator.loadFieldsIL(TypeBuilder typeBuilder) at Microsoft.Dynamics.Ax.Xpp.ILGenerator.declareFields() at Microsoft.Dynamics.Ax.Xpp.ILGenerator.GenerateXppModule()

Knowing that when the AOT compiles CIL should also work I tried at first these steps:

  1. stop the AOS
  2. navigate to C:\Program Files\Microsoft Dynamics AX\60\Server\AX2012R2CU7\bin\
  3. rename XppIL Folder to something else
  4. restart AOS
The restart will create XppIL folder again. If that doesn't happen grant the AOS Service user read and write access to the server restart again.

In my case I still got the error. So instead of compiling with axbuild I started a compilation of all tables and classes from the aot. After that I was able to generate full CIL.

So instead of compiling the System with axbuild we should still do a compilation from the AOT when we have a newly installed environment.

13 February 2014

Microsoft.Dynamics.AX.DMF.ServiceProxy.dll.config

If you recieve the following error message when opening DIXF forms after updating to CU7 there is an easy Workaround to fix this issue



System.InvalidOperationException: Die Konfigurationsdatei C:\Program Files\Microsoft Dynamics AX\60\Server\AX2012R2CU7\Bin\Microsoft.Dynamics.AX.DMF.ServiceProxy.dll.config der Anwendung wurde nicht gefunden. Stellen Sie sicher, dass für die Assembly, die den spezifischen Dienstclienttyp enthält, eine Quelldatei für die Anwendungskonfiguration vorhanden ist. Die folgenden Pfade wurden geprüft:
C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Dynamics.AX.DMF.ServiceProxy\v4.0_6.2.0.0__31bf3856ad364e35\Microsoft.Dynamics.AX.DMF.ServiceProxy.dll.config
...

Navigate to the Server Folder of your AX Installation and check if the following files are located in the common Directory (C:\Program Files\Microsoft Dynamics AX\60\Server\Common)
  • DMFConfig.xml
  • DMFClientConfig.xml
  • Microsoft.Dynamics.AX.DMF.ServiceProxy.dll.config
if yes just copy them into the Server bin Directory of the instance (C:\Program Files\Microsoft Dynamics AX\60\Server\AX2012R2CU7\Bin\)

If these files are not stored there they could also be in the data Import Export Folder (C:\Program Files\Microsoft Dynamics AX 2012 Data Import Export Framework Server Component)