Pergunta

Eu escrevi um utilitário no C # para copiar arquivos de um diretório de rede para uma biblioteca de documentos do SharePoint. Quando o administrador SYS tenta executar o .exe de um servidor não-SharePoint, ele recebe o seguinte erro:

.

Exceção não tratada: System.Io.FilenotFoundException: Não foi possível carregar arquivo ou montagem 'Microsoft.SharePoint.Client, vers íon= 14.0.0.0, Cultura= Neutro, PublickeyToken= 71E9BCE111E9429C 'ou uma de suas dependências. O sistema não pode encontrar o f Ile especificado. Nome do arquivo: 'Microsoft.SharePoint.Client, versão= 14.0.0.0, cultura= neutro, publickeyteken= 71E9bce111E9429c' no spfileupload.program.main ()

WRN: O registro de ligação de montagem está desligado. Para ativar o registro de falha de ligação de montagem, defina o valor do Registro [HKLM \ Software \ Microsoft \ Fusion! EnableLog] (DWORD) para 1.

Existe uma maneira de incluir a montagem no meu .exe para que ele funcione corretamente?

editar: estou usando o SharePoint 2010 modelo de objeto do cliente .

Foi útil?

Solução

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.

Outras dicas

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a sharepoint.stackexchange
scroll top