System Compile/CIL Compile 자동화 하기

Posted by Alvin You
2013. 11. 12. 17:21 Dynamics AX

AX 서버 설치 후 개발 작업을 진행 하다 보면, System Compile과 CIL Compile과 같은 작업들을 종종 해 주어야 하는 상황이 발생합니다. 문제는 System Compile과 CIL Compile 작업이 서로 연결된 작업이 아니기 때문에 한 작업이 끝나기를 기다려 다시 다른 작업을 돌려줘야 되는 수고를 해줘야 됩니다.이 부분에 대한 수고를 아끼기 위해 아래 batch 스크립트를 통해서 2개의 작업을 자동화 시킬 수 있습니다.

또한 윈도우즈 스케쥴러에 등록해 해당 작업을 예약된 시간에 실행시킬 수 있습니다.

 

작업 순서는 Restart AOS Server -> Full System Compile -> Full CIL Compile -> Restart AOS Server

CompileAll에 있는 _-, _+ 표시는 Cross Reference(상호참조) 정보에 대한 갱신 여부를 뜻합니다.

 

AX Client configuration commands에 대한 자세한 정보는 아래 URL 정보를 참고하시면 자세한 정보를 확인 할 수 있습니다.

http://technet.microsoft.com/en-us/library/aa569653.aspx

 

CIL 기능을 사용하는 AX 기능은 AIF framework, AX Batch Server, AX SSRS Reports 등이 있습니다.

 

-- axcompile.bat

SET serviceName=AOS60$01
SET aosHost=ALVIN
SET aosPort=2712
SET appPath="C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin\Ax32.exe"

 

::Restart AOS Server
net stop %serviceName%
net start %serviceName%

 

::Perform Full System Compile
%appPath% -aos2=%aosHost%:%aosPort% -startupcmd=CompileAll_- -lazytableloading -lazyclassloading

 

::Perform Full CIL Compile
%appPath% -aos2=%aosHost%:%aosPort% -startupcmd=CompileIl -lazytableloading -lazyclassloading

 

::Restart AOS Server
net stop %serviceName%
net start %serviceName%