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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

AX 2012 R3 Compilation error

(0) ShareShare
ReportReport
Posted on by 1,103

Experts,

We are receiving below error while trying to compile through command prompt. Any help on this is much appreciated.

cd “C:\Program Files\Microsoft Dynamics AX\60\Server\AOS02XX\bin” .\axbuild.exe xppcompileall / s=01

Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at wmaiCRTStartup()

Categories:
  • Suggested answer
    CU-1234529-002 Profile Picture
    631 on at

    Hi Sridhar,

    The AccessViolationException at wmaiCRTStartup points to a native-level crash when axbuild starts up, so I'd rule out the simple things first.

    1.Check the command syntax. In the AxBuild.exe documentation, the /s parameter takes the AOS instance number (for example /s=01), and the example also passes /altbin pointing to the client bin folder that contains ax32.exe. Your command uses a bare /s with no value and no /altbin, so axbuild may be picking up the wrong settings. Try something like:

    axbuild.exe xppcompileall /s=01 /altbin="C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin"

    Use your actual instance number from the Server Configuration Utility (AxSrvCfg.exe).

    2.Run the command prompt as administrator, using an account with at least the same authority as the AOS service account. The same documentation page calls this out.

    3.Since you already suspect the Visual C++ runtime, repair or reinstall both the x86 and x64 versions from the latest supported Visual C++ Redistributable downloads, restart the server, and retry.

    4.Check available memory. AxBuild starts several temporary AOS processes, and this community post describes compile problems when SQL Server had consumed all the RAM. Free up memory or lower the number of workers.

    5.Look at the Windows Event Viewer Application log right after the crash. The faulting module name there will tell you which DLL is actually failing. It's also worth temporarily excluding the AOS bin folder from antivirus scanning.

    If the corrected command still crashes, please share the faulting module name from Event Viewer, as that would narrow it down a lot.
    Thanks

  • Sridhar Narayanan Profile Picture
    1,103 on at

    Thank you for the reply. I will check on these and share the findings.

  • Sridhar Narayanan Profile Picture
    1,103 on at

    Here is the command I have used for compiling. Initially I missed the value 01 while raising this question in the forum. I have updated my question.

    cd "C:\Program Files\Microsoft Dynamics AX\60\Server\AOS02XX\bin"

    .\axbuild.exe xppcompileall /s=01

  • Anton Venter Profile Picture
    21,343 Super User 2026 Season 2 on at

    @Sridhar Narayanan 

    Can you give more context and share more information? E.g. what kind of server are you using for the compile?

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287 Super User 2026 Season 2

#2
Aayush Tiwari Profile Picture

Aayush Tiwari 219

#3
Subra Profile Picture

Subra 213 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans