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 am using Microsoft SharePoint Guidance for logging and exception handling in my SharePoint timer job, my solution in SharePoint 2007 worked perfectly (and is working).

Right now I am in the process of upgrading my solution to Visual Studio 2010, I took new version of SPG for SharePoint 2010 and compiled the assemblies.

However I am getting following exception, seems that Service Location assembly is not being loaded correctly, I have removed the assembly reference multiple times I am not sure what is going wrong with loading the assembly.

Any Pointers?

Log Name:      Application
Source:        Microsoft-SharePoint Products-SharePoint Foundation
Date:          10/25/2012 11:52:00 AM
Event ID:      6398
Task Category: Timer
Level:         Critical
User:          NETWORK SERVICE
The Execute method of job definition Halliburton.SharePoint.SiteAudit.SiteAddTimerJob (ID ab997783-7c34-4e5d-bade-30ea57ef1a0c) threw an exception. More information is included below.

Could not load file or assembly 'Microsoft.Practices.ServiceLocation, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
share|improve this question

Thanks a lot for your replies, it seems that some old version of DLLs are being held in the memory. I run IISRESET command and restarted the Timer Service and the error was gone.

So problem to the solution is the Microsoft Way -- RESET :)

"Sudhir Kesharwani"

share|improve this answer

You could try adding that DLL to the GAC (Global Assembly Cache) using gacutil or copying it to the BIN folder of the SharePoint web app directory in inetpub...

share|improve this answer
My Solution Package does the GAC installation, I am able to see the assembly installed in the GAC – Sudhir Kesharwani Oct 25 '12 at 18:01
Does that DLL have any reference DLLs that are missing? You can use tools like .NET Reflector to open the DLL and see what it references. – John Chapman Oct 25 '12 at 18:26

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.