激活wsp文件时无法加载接收器程序集异常

时间:2013-06-18 04:23:52

标签: sharepoint sharepoint-2010 sandbox sharepoint-2013 wsp

我有一个沙盒解决方案,它是从VS2010创建的。沙箱实际上是为SharePoint 2010创建的。沙箱解决方案也可以在Office 365 (即SharePoint 2013 Online )中顺利运行。激活后,它将添加一个库并在该库中添加一个Web部件页面。但是,当我尝试在SharePoint 2013 Server(本地版本,我们的服务器计算机中本地安装)中激活相同的沙盒解决方案时,我从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.
..

ULS日志显示以下例外情况

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

功能安装: 将功能'SolTest_Company Office 365沙箱功能'(ID:'44613a8d-0406-4dea-ac63-09db6aba469a')安装到服务器场中。

无法为功能“SolTest_Company Office 365沙盒功能”加载接收器程序集“SolTest,Version = 1.0.0.0,Culture = neutral,PublicKeyToken = fd92f09fdeeefafe”(ID: 44613a8d-0406-4dea- ac63-09db6aba469a):System.IO.FileNotFoundException:无法加载文件。

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

所以我想知道为什么沙盒解决方案在SharePoint 2013的云版本中有效,但在本地版本中不起作用。有人可以对此有所了解吗?我尝试使用浏览器激活沙箱解决方案。我没有尝试过使用电源外壳。会有什么不同吗?

Thanks,
Prakash

1 个答案:

答案 0 :(得分:0)

我在同一个案件中;应用程序通过Nappa开发,部署并在sharePoint Online(与Office 365帐户捆绑在一起)上运行。

当我想在我们的SP 2013本地服务器(通过PowerShell)上安装它时,它会退出"安装"状态,并在日志中我得到了着名的:" 在解决方案SOLUTION_NAME.wsp:assembly''中键入'中缺少以下一个或多个以下属性;' "

此错误含义广泛,因为它可能来自SP版本,使用的变量类型,错误的清单文件,WebConfiguration ......之间的差异......

在我的情况下,我还没有发现它可以来自哪里。我的应用程序非常简单,它只加载列表内容,并使用纯web(HTML / JS / CSS)以特定方式显示它,所以我不认为它可能来自一个奇怪的依赖...