powerplatform-vscode icon indicating copy to clipboard operation
powerplatform-vscode copied to clipboard

PluginBase Error

Open pratyush369 opened this issue 2 years ago • 0 comments

When new Plugin in initialized using pac plugin init command. The OrgSvcFactory & Notification Service is not available and object reference error is shown, this issue is in PluginBase class.

            NotificationService = serviceProvider.Get<IServiceEndpointNotificationService>();

            IOrganizationServiceFactory factory = serviceProvider.Get<IOrganizationServiceFactory>();

GetService method must be used here instead of Get Method.

pratyush369 avatar Jan 07 '23 22:01 pratyush369