SharePoint ServerでSharePointユーティリティを実行しています
-
10-12-2019 - |
質問
C#のユーティリティを書き出して、ネットワークディレクトリからSharePointドキュメントライブラリにファイルをコピーしました。 SYS管理者がSharePoint以外のサーバーから.exeを実行しようとすると、次のエラーが発生します。
未処理の例外:System.IO.FileNotFoundException:ファイルまたはアセンブリのMicrosoft.SharePoint.clientをロードできませんでした、 イオン= 14.0.0.0、培養=中立、PublicKeykeN= 71E9BCE111E9429C 'またはその依存関係の1つ。システムはFを見つけることができません 指定されたILE。 ファイル名: 'Microsoft.SharePoint.client、Version= 14.0.0.0、Culture= Neutral、PublicKeykeke= 71e9bce111e9429c' spfileupload.program.main()で
WRN:アセンブリバインディングロギングをオフにします。 アセンブリバインド障害ログを有効にするには、レジストリ値[hklm \ software \ Microsoft \ Fusion!EnableLog](DWORD)を1に設定します。
私の.exeにアセンブリを含める方法は正しく実行されるようにしますか?
編集:私はSharePoint 2010を使用しています2010 クライアントオブジェクトモデル
解決
Instructions on how to deploy the SharePoint 2010 Client Object Model assemblies can be found in Client Object Model Distribution and Deployment
Microsoft SharePoint Foundation 2010 installs Microsoft.SharePoint.Client.dll and Microsoft.SharePoint.Client.Runtime.dll in %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\ISAPI for easy access in development. You must have both Microsoft.SharePoint.Client.dll and Microsoft.SharePoint.Client.Runtime.dll to develop a solution remotely with the .NET managed object model. For a Windows Forms, Windows Presentation Foundation (WPF), or other application that calls the .NET managed SharePoint Foundation client APIs, to function, the client computer must have the SharePoint Foundation client DLLs installed. The client DLLs must be distributed with the application by using Microsoft's SharePoint Foundation 2010 Client Object Model Redistributable.
他のヒント
Please Use NuGet Package Manager to add DLLs to your project