Failed to load receiver assembly - FileNotFoundException

Struggling with this, the project builds and deploys when I do not have EventReceivers in my functions, and it fails when I do it. I'm not quite sure which FileNotFoundException file refers to

Error in visual studio

Error   1   Error occurred in deployment step 'Activate Features': Failed to load receiver assembly "Decisions.Features, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8d09acb153961cfd" for feature "Decisions.Features_DeployDecisionCommittee" (ID: 779492d8-f053-45ce-8340-5fa6d7f87a90).: System.IO.FileNotFoundException: Could not load file or assembly 'Decisions.Features, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8d09acb153961cfd' or one of its dependencies. The system cannot find thefile specified.
File name: 'Decisions.Features, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8d09acb153961cfd'
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()

=== Pre-bind state information ===
LOG: DisplayName = Decisions.Features, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8d09acb153961cfd
(Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE/Extensions/Microsoft/SharePoint/
LOG: Initial PrivatePath = C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\SharePoint\VstspCache7880
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\SharePoint\vssphost5.exe.Config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Decisions.Features, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8d09acb153961cfd
LOG: The same bind was seen before, and was failed with hr = 0x80070002.

    0   0   Decisions.Features

Build Binging Log Viewer

* Assembly Binder Log Entry (04/25/2014 @ 11:11:41) *

The operation failed. Binding Result: hr = 0x80070002. The system cannot find the specified file.

Build manager downloaded from: C: \ Windows \ Microsoft.NET \ Framework64 \ v4.0.30319 \ clr.dll Run under the executable file C: \ Program Files (x86) \ Microsoft Visual Studio 11.0 \ Common7 \ IDE \ Extensions \ Microsoft \ SharePoint \ vssphost5.exe --- The following is a detailed error log.

=== === LOG: DisplayName = Decisions.Features, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = 8d09acb153961cfd  ( ) LOG: Appbase = file:///C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE//Microsoft/SharePoint/ LOG: Initial PrivatePath = C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\SharePoint\VstspCache7880 LOG: Dynamic Base = NULL LOG: - = NULL LOG: AppName = vssphost5.exe

: ().

LOG: . LOG: : C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\SharePoint\vssphost5.exe.Config LOG: : LOG: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config. LOG: : Decisions.Features, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = 8d09acb153961cfd LOG: GAC . LOG: URL:///C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE//Microsoft/SharePoint/Decisions.Features.DLL. LOG: URL:///C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE//Microsoft/SharePoint/Decisions.Features/Decisions.Features.DLL. LOG: URL:///C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE/Extensions/Microsoft/SharePoint/VstspCache7880/Decisions.Features.DLL. LOG: URL:///C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE//Microsoft/SharePoint/VstspCache7880/Decisions.Features/Decisions.Features.DLL. LOG: URL:///C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE//Microsoft/SharePoint/PublicAssemblies/Decisions.Features.DLL. LOG: URL:///C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE//Microsoft/SharePoint/PublicAssemblies/Decisions.Features/Decisions.Features.DLL. LOG: URL:///C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE/Extensions/Microsoft/SharePoint/Decisions.Features.EXE. LOG: URL:///C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE//Microsoft/SharePoint/Decisions.Features/Decisions.Features.EXE. LOG: URL:///C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE//Microsoft/SharePoint/VstspCache7880/Decisions.Features.EXE. LOG: URL:///C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE//Microsoft/SharePoint/VstspCache7880/Decisions.Features/Decisions.Features.EXE. LOG: URL:///C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE//Microsoft/SharePoint/PublicAssemblies/Decisions.Features.EXE. LOG: URL:///C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE//Microsoft/SharePoint/PublicAssemblies/Decisions.Features/Decisions.Features.EXE. LOG: URL- .

+4
3

, ,

First resolution:
路          Retract the Solution/WSP in VS.
路          Close VS.
路          Reopen VS and deploy the Project.

Second resolution:
If closing VS after retraction doesn't solve the problem then a larger workaround is:
路          Redeploy the project -> This will show an error during feature activation.
路          Go to SharePoint UI and Activate and then Deactivate the deployed feature that was showing activation error in VS.
路          Retract the Solution/WSP in VS.
路          Close VS.
路          Reopen VS and deploy the Project.

http://support.microsoft.com/kb/2022443

+11

.

. . . . , .

+1

This worked for me: change the version of your VS project in the assembly. For example, I changed the assembly and file version to 1.1.0.0 instead of 1.0.0.0.

Deployed and no problem.

Subsequently, I could just set it back to 1.0.0.0 and continue the deployment without errors or problems ...

0
source

Source: https://habr.com/ru/post/1538048/


All Articles