Pregunta

Escribí una utilidad en C # para copiar archivos desde un directorio de red a una biblioteca de documentos de SharePoint. Cuando el administrador de SYS intenta ejecutar el .exe desde un servidor que no sea SharePoint, obtiene el siguiente error:

Excepción no controlada: System.io.FileNotFoundException: No se pudo cargar el archivo o el ensamblaje 'Microsoft.SharePoint.Client, vers ion= 14.0.0.0, cultura= neutral, publickeytoken= 71E9BCE111E9429C 'o una de sus dependencias. El sistema no puede encontrar la F Ile especificado. Nombre del archivo: 'Microsoft.SharePoint.Client, versión= 14.0.0.0, Cultura= Neutral, Public LeakeToken= 71E9BCE111E9429C' en spfileupload.program.main ()

WRN: el registro de unión al ensamblaje está apagado. Para habilitar el registro de fallas en el ensamblaje, configure el valor de registro [HKLM \ Software \ Microsoft \ Fusion! EnableLog] (DWORD) a 1.

¿Hay alguna manera de incluir el ensamblaje en mi .exe para que se ejecute correctamente?

Editar: Estoy usando el SharePoint 2010 Modelo de objeto cliente .

¿Fue útil?

Solución

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.

Otros consejos

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

Licenciado bajo: CC-BY-SA con atribución
scroll top