SharePoint 4 Developers

Guia de referência adicional em desenvolvimento .NET / SharePoint

Error occurred in deployment step 'Add Solution': Failed to load receiver assembly

Alguns problemas na integração Visual Studio 2010 x SharePoint Foundation 2010 ainda podem ser encontradas: Error occurred in deployment step 'Add Solution': Failed to load receiver assembly Microsoft.Office.SharePoint.ClientExtensions ou Could not load file or assembly Microsoft.Office.Server

Oi pessoal, tudo bem?

A integração Visual Studio 2010 x SharePoint Foundation 2010 no deploy de soluções do tipo BDC Model ainda apresenta problemas. O problema está no deploy pelo Visual Studio, justamente por não encontrar as DLLs necessárias para realizar a operação. Seguem mensagens de erro encontradas:

Problemas:

Error occurred in deployment step 'Add Solution': Failed to load receiver assembly "Microsoft.Office.SharePoint.ClientExtensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" for feature "<Sua Feature>: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Office.SharePoint.ClientExtensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.Office.SharePoint.ClientExtensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'
   at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.Load(String assemblyString)
   at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()

Error occurred in deployment step 'Add Solution': Could not load file or assembly 'Microsoft.Office.Server, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.

Solução:

Para eliminar esse problema é necessário a cópia de alguns arquivos do SharePoint Server 2010, encontrados no diretório 14\ISAPI:

  • microsoft.office.sharepoint.clientextensions.dll
  • Microsoft.Office.Sharepoint.ClientExtensions.xml
  • Microsoft.Office.Server.dll
  • Microsoft.Office.Server.xml

Registre as DLLs no GAC para eliminar o problema, simplesmente copiando as DLLs para o diretório C:\Windows\assembly.

Reinicie o Visual Studio 2010 e realize o deploy de sua solução do BDC Model sem problemas!

[]’s

Marcel Medina

Clique aqui para ler o mesmo conteúdo em Inglês.

blog comments powered by Disqus