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 developed a timer job feature using wsp-builder now when I take wsp file and deploy it to our development server it references an old version of dll from GAC even tho I updated gac with latest version of my dll.

so as a solution I copied that specific dll in project by checking "Copy Local" property to true, Now it solved the problem but this doesn't sound right as if someone updated that dll and updated server, my timer service will still reference old version.

How can I force my timer job to get dll from Gac ?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

When Fusion (the system behind .net that controls assembly binding) looks for an Assembly it will always look in the GAC first.

Whats probably happening here is :-

  • You deploy your timer job assembly v1
  • The Timer service loads the assembly v1
  • You deploy your new timer assembly to the GAC (v2)
  • The Timer service already has V2 'bound' so it will not load it until its restarted.

Solution - ensure you restart the Timer service when re-deploying.

share|improve this answer
    
I always restarted my Timer service as well as application pools just in case. –  Muhammad Raja Aug 24 '12 at 7:44

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.