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)

AxBuild.exe .Net Error and Fail R2 CU7

(0) ShareShare
ReportReport
Posted on by 340

Hi

We are testing CU7 on a Windows 2012 r2 server and when I use the AxBuild compiler it crashes after pass 2 with the following .net error. I have included the whole verbose console output

C:\Program Files\Microsoft Dynamics AX\60\Server\AX_Dynamics_Dev\bin>axbuild.exe

xppcompileall /aos=01 /altbin="C:\Program Files (x86)\Microsoft Dynamics AX\60\

Client\Bin" /v /nocleanup

Microsoft (R) Dynamics AX Build Utility 6.2.1000.4051

Copyright (C) Microsoft Corporation.  All rights reserved.

-console 01 -aol=usr -noauto -build=deploy

*** Deploy worker started - waiting for process to exit...

*** Deploy worker completed with result 'Success'

*** Compile all starting at 11/03/2014 10:06:08.

*** Kicking off header compilation (pass 1) with 6 workers.

-console 01 -aol=usr -skipdbsync "-altbin=C:\Program Files (x86)\Microsoft Dynam

ics AX\60\Client\Bin" -noauto -build=nodelist_C:\Users\administrator.GAB\AppData

\Local\Temp\2\tmpA9C8.tmp,badlist_C:\Users\administrator.GAB\AppData\Local\Temp\

2\tmpA9DB.tmp,logfile_C:\Users\administrator.GAB\AppData\Local\Temp\2\tmpA9DC.tm

p,compile_pass1

-console 01 -aol=usr -skipdbsync "-altbin=C:\Program Files (x86)\Microsoft Dynam

ics AX\60\Client\Bin" -noauto -build=nodelist_C:\Users\administrator.GAB\AppData

\Local\Temp\2\tmpA9C6.tmp,badlist_C:\Users\administrator.GAB\AppData\Local\Temp\

2\tmpA9DD.tmp,logfile_C:\Users\administrator.GAB\AppData\Local\Temp\2\tmpA9DE.tm

p,compile_pass1

-console 01 -aol=usr -skipdbsync "-altbin=C:\Program Files (x86)\Microsoft Dynam

ics AX\60\Client\Bin" -noauto -build=nodelist_C:\Users\administrator.GAB\AppData

\Local\Temp\2\tmpA9C9.tmp,badlist_C:\Users\administrator.GAB\AppData\Local\Temp\

2\tmpA9DF.tmp,logfile_C:\Users\administrator.GAB\AppData\Local\Temp\2\tmpA9E0.tm

p,compile_pass1

-console 01 -aol=usr -skipdbsync "-altbin=C:\Program Files (x86)\Microsoft Dynam

ics AX\60\Client\Bin" -noauto -build=nodelist_C:\Users\administrator.GAB\AppData

\Local\Temp\2\tmpA9C7.tmp,badlist_C:\Users\administrator.GAB\AppData\Local\Temp\

2\tmpA9E1.tmp,logfile_C:\Users\administrator.GAB\AppData\Local\Temp\2\tmpA9E2.tm

p,compile_pass1

-console 01 -aol=usr -skipdbsync "-altbin=C:\Program Files (x86)\Microsoft Dynam

ics AX\60\Client\Bin" -noauto -build=nodelist_C:\Users\administrator.GAB\AppData

\Local\Temp\2\tmpA9CA.tmp,badlist_C:\Users\administrator.GAB\AppData\Local\Temp\

2\tmpA9E3.tmp,logfile_C:\Users\administrator.GAB\AppData\Local\Temp\2\tmpA9E4.tm

p,compile_pass1

*** Worker started - waiting for process to exit...

*** Worker started - waiting for process to exit...

*** Worker started - waiting for process to exit...

*** Worker started - waiting for process to exit...

*** Worker started - waiting for process to exit...

-console 01 -aol=usr -skipdbsync "-altbin=C:\Program Files (x86)\Microsoft Dynam

ics AX\60\Client\Bin" -noauto -build=nodelist_C:\Users\administrator.GAB\AppData

\Local\Temp\2\tmpBB69.tmp,badlist_C:\Users\administrator.GAB\AppData\Local\Temp\

2\tmpBB6A.tmp,logfile_C:\Users\administrator.GAB\AppData\Local\Temp\2\tmpBB6B.tm

p,compile_pass1

*** Worker started - waiting for process to exit...

*** Worker completed with result 'Success'

*** Worker completed with result 'Success'

*** Worker completed with result 'Success'

*** Worker completed with result 'Success'

*** Worker completed with result 'Success'

*** Worker completed with result 'Success'

*** Compile execution for first pass with 6 workers ran from 11/03/2014 10:06:09

to 11/03/2014 10:09:15 (00:03:06.4132521).

*** Kicking off full compilation (pass 2) with 6 workers.

-console 01 -aol=usr -build=nodelist_C:\Users\administrator.GAB\AppData\Local\Te

mp\2\tmp8210.tmp,badlist_C:\Users\administrator.GAB\AppData\Local\Temp\2\tmp8224

_badList.tmp,logfile_C:\Users\administrator.GAB\AppData\Local\Temp\2\tmp8226_err

.tmp,compile_pass2 -skipdbsync -noauto "-altbin=C:\Program Files (x86)\Microsoft

Dynamics AX\60\Client\Bin"

-console 01 -aol=usr -build=nodelist_C:\Users\administrator.GAB\AppData\Local\Te

mp\2\tmp8211.tmp,badlist_C:\Users\administrator.GAB\AppData\Local\Temp\2\tmp8225

_badList.tmp,logfile_C:\Users\administrator.GAB\AppData\Local\Temp\2\tmp8227_err

.tmp,compile_pass2 -skipdbsync -noauto "-altbin=C:\Program Files (x86)\Microsoft

Dynamics AX\60\Client\Bin"

-console 01 -aol=usr -build=nodelist_C:\Users\administrator.GAB\AppData\Local\Te

mp\2\tmp820E.tmp,badlist_C:\Users\administrator.GAB\AppData\Local\Temp\2\tmp8228

_badList.tmp,logfile_C:\Users\administrator.GAB\AppData\Local\Temp\2\tmp822B_err

.tmp,compile_pass2 -skipdbsync -noauto "-altbin=C:\Program Files (x86)\Microsoft

Dynamics AX\60\Client\Bin"

*** Worker started - waiting for process to exit...

-console 01 -aol=usr -build=nodelist_C:\Users\administrator.GAB\AppData\Local\Te

mp\2\tmp8212.tmp,badlist_C:\Users\administrator.GAB\AppData\Local\Temp\2\tmp822A

_badList.tmp,logfile_C:\Users\administrator.GAB\AppData\Local\Temp\2\tmp822E_err

.tmp,compile_pass2 -skipdbsync -noauto "-altbin=C:\Program Files (x86)\Microsoft

Dynamics AX\60\Client\Bin"

-console 01 -aol=usr -build=nodelist_C:\Users\administrator.GAB\AppData\Local\Te

mp\2\tmp820F.tmp,badlist_C:\Users\administrator.GAB\AppData\Local\Temp\2\tmp8229

_badList.tmp,logfile_C:\Users\administrator.GAB\AppData\Local\Temp\2\tmp822C_err

.tmp,compile_pass2 -skipdbsync -noauto "-altbin=C:\Program Files (x86)\Microsoft

Dynamics AX\60\Client\Bin"

-console 01 -aol=usr -build=nodelist_C:\Users\administrator.GAB\AppData\Local\Te

mp\2\tmp8223.tmp,badlist_C:\Users\administrator.GAB\AppData\Local\Temp\2\tmp822D

_badList.tmp,logfile_C:\Users\administrator.GAB\AppData\Local\Temp\2\tmp823E_err

.tmp,compile_pass2 -skipdbsync -noauto "-altbin=C:\Program Files (x86)\Microsoft

Dynamics AX\60\Client\Bin"

*** Worker started - waiting for process to exit...

*** Worker started - waiting for process to exit...

*** Worker started - waiting for process to exit...

*** Worker started - waiting for process to exit...

*** Worker started - waiting for process to exit...

*** Worker completed with result 'Success'

*** Worker completed with result 'Success'

*** Worker completed with result 'Success'

*** Worker completed with result 'Success'

*** Worker completed with result 'Success'

*** Worker completed with result 'Success'

Unhandled Exception: System.AggregateException: One or more errors occurred. ---

> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negati

ve and less than the size of the collection.

Parameter name: startIndex

  at System.String.IndexOf(Char value, Int32 startIndex, Int32 count)

  at axbuild.CompileLog.ExtractLogInformation(String line)

  at axbuild.Program.UpdateLog(String logFile)

  at axbuild.Program.<>c__DisplayClass4.<Compile_Full>b__3(List`1 nodes)

  at System.Threading.Tasks.Parallel.<>c__DisplayClassf`1.<ForWorker>b__c()

  at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)

  at System.Threading.Tasks.Task.<>c__DisplayClass11.<ExecuteSelfReplicating>b_

_10(Object param0)

  --- End of inner exception stack trace ---

  at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationTo

ken cancellationToken)

  at System.Threading.Tasks.Task.Wait()

  at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int

32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWit

hState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)

  at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`

1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState

, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithE

verything, Func`1 localInit, Action`1 localFinally)

  at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable`1 source, Act

ion`1 body)

  at axbuild.Program.Compile_Full(List`1 Nodes, Boolean withXppSupport, Int32 p

ass)

  at axbuild.Program.CompileAll(Int32 numberOfProcessesPass1, Int32 numberOfPro

cessesPass2and3, SqlConnection modelStoreConnection)

  at axbuild.Program.Main(String[] args)

*This post is locked for comments

I have the same question (0)
  • Matt Lancashire Profile Picture
    340 on at

    Here is the event log application error too

    Faulting application name: AXBuild.exe, version: 6.2.1000.4051, time stamp: 0x5272cc71

    Faulting module name: KERNELBASE.dll, version: 6.3.9600.16408, time stamp: 0x523d557d

    Exception code: 0xe0434352

    Fault offset: 0x000000000000ab78

    Faulting process id: 0x1930

    Faulting application start time: 0x01cf3d117c829239

    Faulting application path: C:\Program Files\Microsoft Dynamics AX\60\Server\AX_Dynamics_Dev\bin\AXBuild.exe

    Faulting module path: C:\Windows\system32\KERNELBASE.dll

    Report Id: 175c46a3-a906-11e3-80c1-005056b96fd0

    Faulting package full name:

    Faulting package-relative application ID:

  • Tommy Skaue Profile Picture
    Moderator on at

    Can you confirm that you ran this in an elevated command prompt? It should say "Administrator:" in the title of the window. axbuild needs to run in an elevated window (either cmd or powershell).

  • Matt Lancashire Profile Picture
    340 on at

    Hi,

    Yes, I was running elevated.

    Matt

  • Tommy Skaue Profile Picture
    Moderator on at

    I see it stops in pass 2. I would advice to open the client and the developer workspace and compile forms and reports (imported morphx reports?).

    I've seen axbuild be flaky in some environments and the only way around has been narrowing down the troublesome elements using development studio in AX instead. Maybe a better and more stable version is on route. :-)

  • Matt Lancashire Profile Picture
    340 on at

    I am now going through this to see if I can spot anything.

    I am not confident though as the error is a little generic and there is also a .net framework error in the event log

    Application: AXBuild.exe

    Framework Version: v4.0.30319

    Description: The process was terminated due to an unhandled exception.

    Exception Info: System.AggregateException

    Stack:

      at System.Threading.Tasks.Parallel.ForWorker[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](Int32, Int32, System.Threading.Tasks.ParallelOptions, System.Action`1<Int32>, System.Action`2<Int32,System.Threading.Tasks.ParallelLoopState>, System.Func`4<Int32,System.Threading.Tasks.ParallelLoopState,System.__Canon,System.__Canon>, System.Func`1<System.__Canon>, System.Action`1<System.__Canon>)

      at System.Threading.Tasks.Parallel.ForEachWorker[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable`1<System.__Canon>, System.Threading.Tasks.ParallelOptions, System.Action`1<System.__Canon>, System.Action`2<System.__Canon,System.Threading.Tasks.ParallelLoopState>, System.Action`3<System.__Canon,System.Threading.Tasks.ParallelLoopState,Int64>, System.Func`4<System.__Canon,System.Threading.Tasks.ParallelLoopState,System.__Canon,System.__Canon>, System.Func`5<System.__Canon,System.Threading.Tasks.ParallelLoopState,Int64,System.__Canon,System.__Canon>, System.Func`1<System.__Canon>, System.Action`1<System.__Canon>)

      at System.Threading.Tasks.Parallel.ForEach[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable`1<System.__Canon>, System.Action`1<System.__Canon>)

      at axbuild.Program.Compile_Full(System.Collections.Generic.List`1<System.Collections.Generic.List`1<System.String>>, Boolean, Int32)

      at axbuild.Program.CompileAll(Int32, Int32, System.Data.SqlClient.SqlConnection)

      at axbuild.Program.Main(System.String[])

  • Suggested answer
    Denis Macchinetti Profile Picture
    16,444 on at

    Hi Matt

    You can install the last Kernel update ( 6.2.1000.6381) ?

    blogs.msdn.com/.../overview-of-ax-build-numbers.aspx

    The "hot-swapping of .NET assemblies" option is turned off in the AOS configuration ?

    Also, you can try to run AXBuild with less workers, e.g 2?

    Now you are using 6 workers?

    Finally, have a look on msdn.microsoft.com/.../dn528954.aspx

  • Matt Lancashire Profile Picture
    340 on at

    Hi

    hot swapping was off, although the first run I forgot!

    Have applied the Kernal update and will try again with 2 workers after my client compile has finished in about 4 hours time :(

  • Matt Lancashire Profile Picture
    340 on at

    I installed the hotfix but still no joy.

    Will run an client compile to see what the problems with compile are

  • Verified answer
    SeoSoft ApS Profile Picture
    50 on at

    Found the problem.

    The macro DataContainerTypes  had a cuslayer modification, pointing to some old AxdDMF* macros. That made the compilation of the class AfStronglyTypedDataContainer, and every child class to fail.

    Soeren Olsen

    SeoSoft ApS

    website: http://www.seosoft.dk

  • SC-19081230-0 Profile Picture
    7 on at

    I´m getting the same problem when compiling a clean Ax2012R2(without any CU´s except I have installed the latest Management Utils.

    Any ideas?

    SPC

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
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans