We have encountered the following error while generating a full CIL as part of a CU1 upgrade of AX2012 R2:
Could not load file or assembly ‘Dynamics.Ax.Application, Version=6.2.158.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The system cannot find the file specified. —> System.IO.FileNotFoundException: Could not load file or assembly ‘Dynamics.Ax.Application, Version=6.2.158.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The system cannot find the file specified.
Turned out, the AOS account permissions were modified, and the account no longer had full access to the CIL assembly folder – “..ServerBINXPPL”. The solution is to restore the full control rights to the folder for the AOS account.