I have created my first Plugin and when I try to register it I get the error "no plugin have been selected from the list". The tool I'm using to register the plugin is microsoft.crmsdk.xrmtooling.pluginregistrationtool.9.0.2.3. which I downloaded from Nuget.
I don't know whether it's my plugin code or the registration tool that's causing the problem. The following is my plugin code
class CrmPlugin:IPlugin
{
public void Execute(IServiceProvider serviceProvider)
{
IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));
if (context.InputParameters.Contains("Target") && context.InputParameters["Target"] is Entity)
{
Entity entity = (Entity)context.InputParameters["Target"];
if (entity.LogicalName != "Producer")
{
return;
}
IOrganizationServiceFactory serviceFactory = null;
serviceFactory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);
try
{
// Check UserInput field in a form in Manager entity for the phrase Action.
if (entity.Attributes["UserInput"].ToString() == "Test")
{
entity.Attributes["ViewUserInput"] = "Test Successful";
}
}
catch
{
}
}
}
} Please point out if I am missing something that might be causing this error.









