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.
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 Keywords: User: NETWORK SERVICE Computer: Description: 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=18.104.22.168, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.