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 :
Customer experience | Sales, Customer Insights,...
Answered

In order to debug plugin, How can i deserialize xml file into IPluginExecutionContext Object

(1) ShareShare
ReportReport
Posted on by 28
Hello,
    Can i deserialize the Plugin Profile Xml file into IPluginExecutionContext Object? 
This XML file is saved from the View Plugin Profile feature of the Plugin Registration Tool.
Because I want to use this data to debug the plugin.
So, I want to ask how to do it.
 
Thanks!
I have the same question (0)
  • Amit Katariya007 Profile Picture
    10,409 Super User 2025 Season 2 on at
    ​​​​​​​Can you use Plugin profilter with the visual studio for the debugging? Because it will be only way you can get details of all the various variables that are captured during execution time of plugin.
  • cheng32 Profile Picture
    28 on at
    Thanks for the reply, when I used the plugin registration tool to debug the plugin, I got an error saying that the type Microsoft.Xrm.Sdk.PluginTelemetry.ILogger could not be loaded from assembly Microsoft.Xrm.Sdk
  • Verified answer
    Amit Katariya007 Profile Picture
    10,409 Super User 2025 Season 2 on at
    The error you’re seeing, Microsoft.Xrm.Sdk.PluginTelemetry.ILogger could not be loaded, typically occurs if the version of Microsoft.Xrm.Sdk you're using is out of sync with the one required by the Plugin Registration Tool or by the Dynamics 365 instance. This interface, ILogger, was introduced in newer versions of the SDK, and if you’re using an older version of Microsoft.Xrm.Sdk, it won’t have this type.
  • cheng32 Profile Picture
    28 on at
    Thanks to Amit Katariya007, it's really a version issue, after I updated to the latest version, the plugin debugging tool didn't report an error, but it would be better if I could deserialize the XML to the implementation of the IPluginExecutionContext object, so that I don't need to update the plugin DLL, I can modify the code and do unit tests directly
  • Suggested answer
    Amit Katariya007 Profile Picture
    10,409 Super User 2025 Season 2 on at
    I am not sure with desealization you will get the context object.. because for testing also you need framework that can mimic D365. You can use FakeXrm for it. But here also you will have to setup test tables and data manually.

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 70 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 33 Most Valuable Professional

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans