WSS 3.0 サイトの管理に使用するコンソール アプリケーションがあります。アプリケーションは Microsoft.SharePoint アセンブリを使用します。このアセンブリは、WSS 3.0 ではバージョン 12.0.0.0 です。
ここで、特定のバージョン用に新しいコンソール アプリケーションを再構築することなく、SharePoint 2013 で同じコンソール アプリケーションを使用したいと考えています。SharePoint 2013 にはバージョン 15.0.0.0 の Microsoft.SharePoint アセンブリが付属しているため、次の内容のアプリケーション構成ファイルを作成しました。
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.SharePoint"
publicKeyToken="71e9bce111e9429c"
culture="neutral"
/>
<!-- Redirecting to version 15.0.0.0 of the assembly. -->
<bindingRedirect oldVersion="12.0.0.0"
newVersion="15.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
ただし、バインドは失敗します。理由はありますか?
バインディング ログに次のように表示されます。
** Assembly Binder Log Entry (2013-07-15 @ 11:28:53) **
The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
Running under executable C:\Users\fredrikg\Desktop\Customer\Bin\UseMicrosoftSharePoint.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: User = INFOWEAVER\fredrikg
LOG: DisplayName = Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c
(Fully-specified)
LOG: Appbase = file:///C:/Users/fredrikg/Desktop/Customer/Bin/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = NULL
Calling assembly : UseMicrosoftSharePoint, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\fredrikg\Desktop\Customer\Bin\UseMicrosoftSharePoint.exe.Config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Redirect found in application configuration file: 12.0.0.0 redirected to 15.0.0.0.
LOG: Post-policy reference: Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Users/fredrikg/Desktop/Customer/Bin/Microsoft.SharePoint.DLL.
LOG: Attempting download of new URL file:///C:/Users/fredrikg/Desktop/Customer/Bin/Microsoft.SharePoint/Microsoft.SharePoint.DLL.
LOG: Attempting download of new URL file:///C:/Users/fredrikg/Desktop/Customer/Bin/Microsoft.SharePoint.EXE.
LOG: Attempting download of new URL file:///C:/Users/fredrikg/Desktop/Customer/Bin/Microsoft.SharePoint/Microsoft.SharePoint.EXE.
LOG: All probing URLs attempted and failed.
LOG: Attempting to install assembly using Windows Installer.
LOG: GAC Lookup was unsuccessful.