System.IO.FileNotFoundException on Microsoft.Practices.SharePoint.Common during FeatureActivated

Jul 13, 2012 at 2:54 PM
Edited Jul 13, 2012 at 2:56 PM

I am using features receivers to configure diagnostic areas and categories as recommanded by Microsoft. The feature is activated during the farm solution deployment which also installs Microsoft.Practices.ServiceLocation.dll and Microsoft.Practices.SharePoint.Common.dll to GAC. It throws the exception and the areas and categories are not added. Any ideas are welcome.


Feature receiver assembly 'MyLogger, Version=, Culture=neutral, PublicKeyToken=45gddbcad385gfwe', class 'MyLogger.LoggingFeatureReceiver', method 'FeatureActivated' for feature 'bty044c7-7c10-4756-bef7-12c4b13l988a' threw an exception: System.InvalidOperationException: Failed to create receiver object from assembly "'MyLogger, Version=, Culture=neutral, PublicKeyToken=45gddbcad385gfwe'", class "MyLogger.LoggingFeatureReceiver" for feature "LoggingCategories" (ID: bty044c7-7c10-4756-bef7-12c4b13l988a).: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Practices.SharePoint.Common, Version=, Culture=neutral, PublicKeyToken=ef4330804b3c4129' or one of its dependencies. The system cannot find the file specified.  File name: 'Microsoft.Practices.SharePoint.Common, Version=, Culture=neutral, PublicKeyToken=ef4330804b3c4129'     at Titus.SharePoint.SecuritySuite.Common.TSSLoggingFeatureReceiver..ctor()    WRN: Assembly binding logging is turned OFF.  To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.  Note: There is some performance penalty associated with assembly bind failure logging.  To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].       --- End of inner exception stack trace ---     at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)     at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)     at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)     at System.Activator.CreateInstance(Type type, Boolean nonPublic)     at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()     at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()     at Microsoft.SharePoint.SPFeature.DoActivationCallout(Boolean fActivate, Boolean fForce)

Jan 8, 2013 at 7:42 AM

Hey spdouble,

you fixed this Problem meanwhile?  i have exactly the same Problem but no idea how to fix that.