Hello,
I used to just run a command line for CIL Generation. I changed to use the Community Module to easily add the timeout. I am running a powershell script via the Windows Task Scheduler at night. The Compile-AXIL seems to do nothing and then timeout. I have the timeout set to 2 hours. Prior to calling this, I wipe out any .netmodule, .log, .delete, and .pdb files out of the XppIL directory. No new files get generated. Through the task scheduler, I tell it to Run whether user is logged on or not and to run with the highest privileges. I also tell it to wake the computer to run the task. I cannot get it to actually generate the CIL. However, if I manually run the script, it runs just fine. I have DynamicsAxCommunity.psd1 and DynamicsAxCommunity.psm1 located in this directory: "C:\Windows\System32\WindowsPowerShell\v1.0\Modules\DynamicsAxCommunity" so the assemblies are loaded. I do not see anything in the event viewer that gives much info. I even added code to write to a DB in Class SysCompileIL, method generateIL, but nothing is written out when run through the Task Scheduler. When I manually open the .axc file, no windows pop up or anything that would stop the script from continuing.
Here is the line of code that is being run:
Compile-AXIL -ConfigPath "$Script:DBSyncAxc" -Timeout (New-TimeSpan -Hours 2).TotalSeconds;
It also seems to work on servers that use Powershell Version 3. The problem seems to be on servers that use Powershell Version 4.
Any ideas on this?
Thanks!
Tony
*This post is locked for comments
I have the same question (0)