I created a share point time job using visual studio 2010. I deployed that job using VS and i got some error while debugging this job. I rectified the error and again deployed this but when i debugged again my timer job picking up the old references. For my wonder i deployed this again and again but same issue was still there even i manually deployed the job and referenced assemblies in to GAC. At last i removed each and ever reference manually and again redeployed this but the problem was pathetic and my recent changes were not picked up by timer job. Finally i came to know that “SharePoint 2010 Timer” service holds the old reference even i redeployed the solution by visual studio. So below are the steps that how i rectified this issue and the proper way of deployment of SharePoint Timer job so that if you modify the timer job code and redeployed this then new changes should be picked up by timer job.
- Deploy the timer job first. (Either directly by Visual Studio or Power Shell script or STSADM using wsp).
- Go to Start > Run (Windows Key+R)
- Type Services.msc and hit enter or click on OK.
- Now inside service console locate “SharePoint 2010 Timer”.
- Stop and Start service (You can directly use Restart option).
- Now go to Start > Run (Windows+R) again
- Type IISRESET and hit enter.
- After iisreset successfully your new modifications inside timer job code will be picked up and service will run smooth(If code written for timer job is correct.).
Happy SharePointing 🙂 Enjoy 🙂