简体   繁体   中英

Failed to load receiver assembly exception occurs when activating the wsp file

I have a sandbox solution, that is created from VS2010. The sandbox was actually created for SharePoint 2010. The sandbox solution also works smoothly in Office 365 (ie SharePoint 2013 Online ). When it is activated, it will add a library and add a web part page inside of that library. But when I tried to activate the same sandbox solution in the SharePoint 2013 Server (On-premises version, which is installed locally in our server machine), I got the following error as seen from FUSLOGVW.

*** Assembly Binder Log Entry  (6/16/2013 @ 2:55:20 PM) ***

The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.

Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable  C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\usercode\SPUCWorkerProcess.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: User = ELV1\spadmin
LOG: DisplayName = SolTest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=fd92f09fdeeefafe
 (Fully-specified)
LOG: Appbase = file:///C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/15/usercode/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = Sandboxed Code Execution Partially Trusted AppDomain
Calling assembly : Microsoft.SharePoint, Version=15.900.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c.


LOG: This bind starts in default load context.

LOG: Using application configuration file: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\usercode\SPUCWorkerProcess.exe.Config

LOG: Using host configuration file: 

LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.

WRN: Application configuration file safe mode disallowed.

LOG: Post-policy reference: SolTest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=fd92f09fdeeefafe
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/15/usercode/SolTest.DLL.

LOG: Attempting download of new URL file:///C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/15/usercode/SolTest/SolTest.DLL.

LOG: Attempting download of new URL file:///C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/15/usercode/assemblies/SolTest.DLL.

LOG: Attempting download of new URL file:///C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/15/usercode/assemblies/SolTest/SolTest.DLL.

LOG: Attempting download of new URL file:///C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/15/usercode/SolTest.EXE.

LOG: Attempting download of new URL file:///C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/15/usercode/SolTest/SolTest.EXE.

LOG: Attempting download of new URL file:///C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/15/usercode/assemblies/SolTest.EXE.

LOG: Attempting download of new URL file:///C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/15/usercode/assemblies/SolTest/SolTest.EXE.

LOG: All probing URLs attempted and failed.
..

And the ULS Logs showed the following exceptoins

>UserAgent not available, file operations may not be optimized.    at .....dd(Int32 >solutionGalleryItemId)     at Microsoft.SharePoint.WebControls.SolutionItemButton.ActivateItem()     ...
>Solution Deployment : Looking for 'ReceiverAssembly' attribute in manifest root node for solution >'Company Office 365 Sandbox Package.wsp'.    
>Solution Deployment : Looking for 'ReceiverClass' attribute in manifest root node for solution 'Company Office 365 Sandbox Package.wsp'     
Solution Deployment  Missing one or more of the following attributes from the root node in solution Company Office 365 Sandbox Package.wsp: assembly , type.     

Feature Installation: Installing Feature 'SolTest_Company Office 365 Sandbox Feature'(ID: '44613a8d-0406-4dea-ac63-09db6aba469a') into the farm.

Failed to load receiver assembly "SolTest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=fd92f09fdeeefafe" for feature "SolTest_Company Office 365 Sandbox Feature" (ID: 44613a8d-0406-4dea-ac63-09db6aba469a).: System.IO.FileNotFoundException: Could not load file.

............
............

So I was wondering why the sandbox solution works in Cloud version of SharePoint 2013 but does not work in On-premises version. Can someone shed some light on it? I have tried to activate the sandbox solution using the Browser. I have not tried using the power shell. Will it make any difference?

Thanks,
Prakash

I'm in the same case; App developped via Nappa, deploy and works on sharePoint Online (the one bundled with Office 365 account).

When I want to install it on our SP 2013 local server (via PowerShell) it exit during the "Installing" status, and in the log i got the famous: " Missing one or more of the following attributes from the root node in solution SOLUTION_NAME.wsp : assembly '', type ''. "

This error is wide meaning, as it can come from differences between SP versions, variables types used, bad manifest file, WebConfiguration ...

In my case I didn't found out where it can come from yet. My app is very simple, it only load a list content, and display it in a particular manner by using pure web (HTML/JS/CSS) so I don't think it could from a weird dependency ...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM