SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 { $ -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?

share|improve this question
up vote 2 down vote accepted

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.

share|improve this answer
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. – Ryan Spears Dec 22 '11 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 '11 at 3:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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