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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Unable to use HTML Agility Pack in Plugin

(0) ShareShare
ReportReport
Posted on by 222
Hello Experts,
 
I have a requirement to parse an Html table from a field into Json. I want to assign the table content separately to another fields.
I installed HtmlAgility Pack v 1.11.57 from nuget and am using below code:
 var doc = new HtmlDocument();
            doc.LoadHtml(html);
            var tableNode = doc.DocumentNode.SelectSingleNode(///table/);
            if (tableNode != null)
            {
                var rows = tableNode.SelectNodes(/.//tr/);
            }
 
I don't get any error during compilation. But once the assembly is update, and plugin executes, I am getting following error.
System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: Could not load file or assembly 'HtmlAgilityPack, Version=1.11.57.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a' or one of its dependencies. The system cannot find the file specified. (Fault Detail is equal to Exception details:
ErrorCode: 0x80040265
Message: Could not load file or assembly 'HtmlAgilityPack, Version=1.11.57.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a' or one of its dependencies. The system cannot find the file specified.
TimeStamp: 2024-01-29T10:41:40.1669805Z
OriginalException: PluginExecution
ExceptionSource: PluginExecution
 
I have checked after the code build, the htmlagility dll is present in the bin folder. I am unable to understand the issue, please help me
I have the same question (0)
  • VS-07100838-0 Profile Picture
    10 on at
    Hi Aparna,
     
    Exactly I have same problem what you are facing in plugin. Its working for you? Could you please help me.
     
     
    Thanks
    Vinoth

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
11manish Profile Picture

11manish 86 Super User 2026 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 58 Most Valuable Professional

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 42 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans