문제

사이트 범위 기능을 활성화 할 때 문제가 있습니다.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].
.

어셈블리 배포 대상은 Visual Studio 2010으로 전개 할 때 WebApplication An입니다.이 모든 것이 잘 작동하지만 콘솔을 사용하여 설명서를 사용하면 오류가 발생합니까?

이 기능 수신기가 내 솔루션의 다른 부분과 동일한 어셈블리에 있습니까?

도움이 되었습니까?

해결책

어셈블리에 이벤트 또는 기능 수신기가 포함되어 있으면 배포 대상은 전역 어셈블리 캐시 여야합니다.그리고 명령 줄을 사용하여 솔루션을 배포하는 경우 기능을 활성화하기 전에 해당 솔루션을 시작해야합니다 (이는 업그레이드 할 때 가장 중요합니다) DLL의 이전 버전을 언로드 할 수 없습니다.

다른 팁

  1. 피쳐 수신기 제거
  2. 깨끗한 솔루션
  3. 닫기 Visual Studio
  4. Windows 탐색기에서 SharePoint 프로젝트의 OBJ 폴더 삭제
  5. Windows 탐색기에서 SharePoint 프로젝트의 bin 폴더 삭제
  6. Open Visual Studio 및 기능 수신기 재 추가
  7. 디버깅을 시작합니다
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top