I have created a custom TimerJob in Visual Studio 2010 using an Empty SharePoint project. I added some functional code and deployed it to my SharePoint site. The TimerJob ran according to plan.

I then made a change to my project's code and redeployed the solution. I got the following exception:

Error occurred in deployment step 'Add Solution': An object of the type <JobName> named "<JobName>" already exists under the parent Microsoft.SharePoint.Administration.SPWebApplication named "<App Name>".  Rename your object or delete the existing object.

I opened up SharePoint 2010 Management Shell and ran the following code to delete the TimerJob:

//To get the TimerJobs id
Get-SPTimerJob | where { $_.name -like “<JobName>” } |ft id,name
//With the id I got the job
$job = Get-SPTimerJob id
//I deleted the job

I then checked to see if the job had been removed from the site at CentralAdministration > Job Definitions and it was not longer visible in the list.

I redeployed my Visual Studio solution and got the same exception. Does anyone have any idea why the TimerJob was not deleted and/or why I am getting this exception?

1 Answer 1


Your solution (WSP) needs to be removed as well as deleting the job.

Use the Remove-SPSolution cmdlet in PowerShell, and then the Uninstall-SPSolution cmdlet.

You could add an event when the solution is removed the job is deleted too.

  • Your solution answered my question. Amusingly, after removing and uninstalling the solution I got around all of the above by double-clicking the Feature I created in VS, selecting Properties and setting the 'Always Force Install' property to TRUE. Dec 22, 2011 at 3:44
  • Nice. :) That is overwriting the previous solution. Usually if you press the stop debugging command inside Visual Studio it will uninstall the package too. You can control what happens when debugging starts/stops in settings. Good to hear it is working. :D
    – Russell
    Dec 22, 2011 at 3:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.