web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

I am trying to write a plugin which has to search through files in sharepoint and return path. For I need to use assembly -- "'Microsoft.SharePoint.Client.Search, Version=16.1.0.0," But error says,above assembly could not be loaded.

(0) ShareShare
ReportReport
Posted on by 19

  I am trying to write a plugin which has to search through files in sharepoint and return path. For I need to use assembly -- "'Microsoft.SharePoint.Client.Search, Version=16.1.0.0," How ever I am getting the below error.

Unhandled exception:
Exception type: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]
Message: An unexpected error occurred from ISV code. (ErrorType = ClientError) Unexpected exception from plug-in (Execute): Sharepoint_searchkeyword.searchkeyword: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SharePoint.Client.Search, Version=16.1.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.Detail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ActivityId>1fdb3743-9e2d-42df-a863-a99eedf6c9d0</ActivityId>
<ErrorCode>-2147220956</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>An unexpected error occurred from ISV code. (ErrorType = ClientError) Unexpected exception from plug-in (Execute): Sharepoint_searchkeyword.searchkeyword: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SharePoint.Client.Search, Version=16.1.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.</Message>
<Timestamp>2019-06-21T05:58:59.2544432Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText>

[Sharepoint_searchkeyword: Sharepoint_searchkeyword.searchkeyword]
[a1ff1324-e893-e911-a825-000d3a47c8cb: Sharepoint_searchkeyword.searchkeyword: Update of lvt_searchprofiles]


</TraceText>
</OrganizationServiceFault>

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Guido Preite Profile Picture
    54,086 Moderator on at

    if it is an online instance (meaning you can only register the assembly in sandbox) the alternatives are two:

    1) try to merge the assemblies with ILMERGE (there are guides to do this for dynamics plugins as you need to keep consistent the signing)

    2) create a public reachable webservice to perform the action and inside your plugin you call the webservice and return the results

  • Suggested answer
    _Lars_ Profile Picture
    225 on at

    I don't think you can use any external libraries with plugins. You can use ILMerge and merge them in but you loose Microsoft support as they are not going to touch your solution if you have used ILMerge by my experience.

    Another approach is to create a HTTPS service that can offload the logic. We use Azure Functions and establish a secure connection where the Azure Function query the external resource with the external library.

    Hope this helps.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans