Central Admin: Job Definition (_admin / servicejobdefinitions.aspx) Errore di riferimento dell'oggetto di lancio dell'oggetto
-
10-12-2019 - |
Domanda
L'amministratore centrale: Definizione di lavoro (_admin / servicejobdefinitions.aspx) Errore di riferimento dell'oggetto dell'oggetto.Tutto funzionava come previsto 3-4 giorni indietro, ho provato a verificare se i miei lavori di timer personalizzati funzionano come previsto, ma sto ottenendo l'errore di cui sopra.Ritirato il lavoro del timer personalizzato, sono in grado di vedere il lavoro del timer. Ma quando provo ad attivare la funzione che ottengo sotto errore:
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
at System.Reflection.RuntimeAssembly.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].
. Soluzione
Below mentioned issue helped me to resolve the issue: Failed to load receiver assembly when activate feature
If the assembly contains any event or feature receivers then the deployment target should be Global Assembly Cache. And if you deploy the solution using a command line then you should start a new instance of that before activating the feature (this is most important when you get to upgrading) as an old version of the dll can't be unloaded.
Remove feature receiver
Clean solution
Close Visual Studio
Delete SharePoint project's obj folder in Windows Explorer
Delete SharePoint project's bin folder in Windows Explorer
Open Visual Studio and re-add feature receiver
Start Debugging