在激活站点范围的功能时出现问题。每次我尝试使用stsadm或powershell激活解决方案时,我收到此错误:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN>STSA
DM.EXE -o activatefeature -url http://example.sp2012.com -id aad760ac-22ff-4873-
acb3-b5b727de032d

Failed to load receiver assembly "Customer.Example.Homepages_v1, Version=1.0.0
.0, Culture=neutral, PublicKeyToken=00eb5deafe22c91f" for feature "Customer.Exam
ple.Homepages_v1" (ID: aad760ac-22ff-4873-acb3-b5b727de032d).: System.IO.F
ileNotFoundException: Could not load file or assembly 'Customer.Example.Homepage
s_v1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=00eb5deafe22c91f' or on
e of its dependencies. The system cannot find the file specified.
File name: 'Customer.Example.Homepages_v1, Version=1.0.0.0, Culture=neutral, P
ublicKeyToken=00eb5deafe22c91f'
   at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase,
Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boo
lean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence
 assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence as
semblySecurity, 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\M
icrosoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure lo
gging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fus
ion!EnableLog].
.

将装配部署目标设置为WebApplication AN,当我使用Visual Studio 2010部署它时,一切正常工作,但是当我使用控制台执行IT手册时,我收到错误?

是与我的解决方案的其他部分相同的组件中的功能接收器吗?

有帮助吗?

解决方案

如果组件包含任何事件或特征接收器,则部署目标应该是全局组装缓存。如果您使用命令行部署解决方案,则应启动在激活该功能之前的新实例(当您升级时最重要)作为DLL的旧版本无法卸载。

其他提示

  1. 删除功能接收器
  2. 清洁解决方案
  3. 关闭视觉工作室
  4. 删除Windows资源管理器中的SharePoint项目的OBJ文件夹
  5. 在Windows资源管理器中删除SharePoint项目的Bin文件夹
  6. 打开Visual Studio和重新添加功能Receiver
  7. 开始调试
许可以下: CC-BY-SA归因
scroll top