1

I created a TimerJob which is activated upon Feature activation. Because I didn't know better, I forgot to add an public default constructor and now I always get this exception: "Error occurred in deployment step 'Retract Solution': Lists.JobTimerReminder cannot be deserialized because it does not have a public default constructor." when I want to retract the solution (or try to disable the Feature, or even when I run 'Get-SPTimerJob' in the Management Shell). I cannot work on and redeploy my project (via Visual Studio) because it has to be retracted beforehand.

How can I get rid of this thing?

  • Run. *Uninstall-spsolution .... -force **Remove-spsolution .... - force. You can also do. Get-sptimerjob | where-object { $_.name -like "...*"} | % { $_.Delete } – user13186 Mar 18 '13 at 15:10
  • Thanks for the quick reply. But I get the error message from above on every single command you posted (I already tried Uninstall and Remove before). [...] is the Name of my custom Timerjob class – Kirschi Mar 18 '13 at 15:22
  • I even removed the whole SiteCollection and created a new one, but this Timerjob seems to be very stubborn... I also tried replacing the assembly via gacutil. I am very desperate atm... – Kirschi Mar 18 '13 at 15:50
  • Changing site collections won't help as timerjobs are stored @ the farm level. Look into what the default constructors are and try to use those as they should still be apart of the timerjob. – user13186 Mar 18 '13 at 16:24
2

Ok after trying ever single uninstall command, cleans, redeployments, Replacing the assembly with a fixed one via Gacutil, Several iisresets, deletion of site collection and so on, it finally worked after restarting my development machine. I think replacing the Assembly in the GAC did the job (+ restarting, otherwise it still wouldn't work).

1

Replacing the dll in GAC and IISRESET did the trick for me :-)

  • could you please explain which dll you meant? – Snickbrack Sep 9 '16 at 8:20
  • dll for the timer job – Unnie Sep 9 '16 at 8:22
  • is it also named like the job or the solution? – Snickbrack Sep 9 '16 at 8:23
  • it will have the project name not solution name – Unnie Sep 9 '16 at 8:39

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.