Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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?

share|improve this question
    
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 Answers 2

up vote 1 down vote accepted

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).

share|improve this answer

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

share|improve this answer

Your Answer

 
discard

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.