on-internet
← Community

Dataverse plugin ExecutionContextId shows different GUID each execution - instances not cached?

Stack Overflow ·

According to Microsoft's documentation on Develop IPlugin implementations as stateless: "Because the platform caches plug-in class instances, the constructor isn't called for every invocation of plug-in execution." However, when testing this behavior, I'm seeing different results. Code to reproduce: public class TestPlugin : IPlugin { private Guid ExecutionContextId { get; } = Guid.NewGuid(); public void Execute(IServiceProvider serviceProvider) { var tracingService = (ITracingService)serviceProvider.GetService(typeof(ITracingService)); tracingService.Trace($"ExecutionContextId: {ExecutionCont

Comments

Sign in or sign up to comment and upvote.

No comments yet.