Severity Code Description Project File Line Suppression State Error One or more errors occurred. —> System.InvalidOperationException: Cannot stop DynamicsAxBatch service on computer ‘.’. —> System.ComponentModel.Win32Exception: The service cannot accept control messages at this time — End of inner exception stack trace — at System.ServiceProcess.ServiceController.Stop()When I open Services, I found that DynamicsAXBatch services is in stopping mode and stuck.
So I killed the service process with CMD command. “taskkill /f /pid [pid number]”The message already shows the service name. ” DynamicsAXBatch” You can copy it from Service detail dialog. So Open CMD with run as administrator and run the following command and get pid
sc queryex DynamicsAxBatchNow I have IP. And kill the Process Id
taskkill /f /pid 5352Now I start the service again. Project is successfully complied.