locked
Issue with custom timer job RRS feed

  • Question

  • Hi,

    I tried creating a custom timer job. I was able to successfully install it, but when i tried to activate i get this error. Pls help.

    -----------------------------------------------------------------------------------------
    Feature 'b82f3a7a-265c-4c8e-9d2c-c8d608839381' could not be installed because the loading of event receiver assembly "MyTimer.SharePointWarmupJob, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b76170ec13688df8" failed: System.IO.FileNotFoundException: Could not load file or assembly 'MyTimer.SharePointWarmupJob, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b76170ec13688df8' or one of its dependencies. The system cannot find the file specified.
    File name: 'MyTimer.SharePointWarmupJob, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b76170ec13688df8'
       at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
       at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
       at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
       at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
       at System.Reflection.Assembly.Load(String assemblyString)
       at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()

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

    Monday, May 16, 2011 6:52 PM

Answers

  • I fixed this. Issue was in the references mentioned in feature.xml.

    • Edited by Mike Walsh FIN Wednesday, May 18, 2011 3:41 PM New question removed. Put in new thread
    • Marked as answer by Mike Walsh FIN Wednesday, May 18, 2011 3:41 PM
    Wednesday, May 18, 2011 3:30 PM

All replies

  • Hi Nagarajan,

    Thanks for posting here. Debug your code and know where error is throwing first.


    Thanks & Regards, Neerubee
    Tuesday, May 17, 2011 5:44 AM
  • Neerubee,

    I have commented all major lines of code and tried to activate. I still get this error. I feel some references or some configuration is missing.

    Can someone share your piece of code ?

    • Proposed as answer by engkarimahmed Wednesday, August 19, 2015 10:46 AM
    Tuesday, May 17, 2011 4:55 PM
  • Hi,

     

    According to your description, I have found an issue with “Could not load file or assembly “ , please have a try to resolve the issue by following steps:

    1.        Click the reference in Visual Studio Solution Explore.

    2.        In the properties windows at the button, change Copy Local to True.

    3.        Deployed the solution.

    Now, adding the two assemblies to the GAC earlier may have contributed to the resolution as well.

     

    Best Regards
    David Hu

     

    Wednesday, May 18, 2011 1:42 AM
  • I fixed this. Issue was in the references mentioned in feature.xml.

    • Edited by Mike Walsh FIN Wednesday, May 18, 2011 3:41 PM New question removed. Put in new thread
    • Marked as answer by Mike Walsh FIN Wednesday, May 18, 2011 3:41 PM
    Wednesday, May 18, 2011 3:30 PM