I'm developing a plugin for CRM 2011.
I have a generic base class for all my plugins:
public abstract class Plugin_Base<T> : IPlugin
where T : Entity, new()
{
void IPlugin.Execute(IServiceProvider serviceProvider)
{
}
}
However when I pass an early bound entity as a parameter, my step registration fails for the plugin: Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Unable to load the plugin type: My.Namespace.AccountPlugin
If I simply change the generic parameter any other class type (and remove the constraint for it to be an Entity), the step registration succeeds.
Why is this happening, is there a way around this?