質問

サイトスコープ機能を起動するときに問題があります。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で展開するときにWebアプリケーションANに設定されています。

この機能受信機は、私の解決策の他の部分と同じアセンブリにありますか?

役に立ちましたか?

解決

アセンブリにイベントまたはフィーチャレシーバが含まれている場合、展開ターゲットはグローバルアセンブリキャッシュにする必要があります。また、コマンドラインを使用してソリューションをデプロイすると、その機能を有効にする前にその新しいインスタンスを起動する必要があります(アップグレードするときに最も重要です)DLLの古いバージョンをアンロードできません。

他のヒント

  1. 機能受信機を削除する
  2. クリーンソリューション
  3. 閉じるVisual Studio
  4. WindowsエクスプローラでSharePointプロジェクトのOBJフォルダを削除します。
  5. WindowsエクスプローラでSharePointプロジェクトのBINフォルダを削除します。
  6. Visual Studioを開き、機能受信機を再度追加する
  7. デバッグを開始します
ライセンス: CC-BY-SA帰属
所属していません sharepoint.stackexchange
scroll top