Domanda

Ho scritto un'utilità in C # per copiare i file da una directory di rete in una libreria di documenti di SharePoint. Quando il SYS Admin tenta di eseguire il .exe da un server non SharePoint, ottiene il seguente errore:

.

Eccezione non gestita: System.IO.FileNotFoundException: impossibile caricare file o assembly 'Microsoft.SharePoint.Client, vers ION= 14.0.0.0, Cultura= neutro, pubblica direttoKoken= 71E9BCE111E9429C 'o una delle sue dipendenze. Il sistema non riesce a trovare il f Ile specificato. Nome file: 'Microsoft.SharePoint.Client, versione= 14.0.0.0, Cultura= Neutro, PublicKoken= 71E9BCE111E9429C' su splileupload.program.main ()

WRN: la registrazione del collegamento del montaggio è disattivata. Per abilitare la registrazione del collegamento del collegamento del gruppo, impostare il valore del registro [HKLM \ Software \ Microsoft \ Fusion! EnableLog] (DWORD) a 1.

C'è un modo per includere l'assemblaggio nel mio .exe in modo che funzioni correttamente?

Modifica: sto usando il SharePoint 2010 modello oggetto client .

È stato utile?

Soluzione

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.

Altri suggerimenti

Please Use NuGet Package Manager to add DLLs to your projectenter image description here

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top