I have followed the steps from this link, and created a plugin: http://msdn.microsoft.com/en-us/library/bb955365.aspx
I have registered it on a Retrieve message for one of my entities, but when it triggers I get this error:
Web Service Plug-in failed in OrganizationId: a2dcffbc-e056-4971-adfb-662979139800; SdkMessageProcessingStepId: 5b6921b8-192e-e011-846c-001d0928c4ac; EntityName: new_csvproiect; Stage: 50; MessageName: Retrieve; AssemblyName: MSDynCRMPlugin.Plugin, MSDynCRMPlugin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a6a43dc7a3dcc61d; ClassName: MSDynCRMPlugin.Plugin;
Exception: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. at MSDynCRMPlugin.Plugin.Execute(IPluginExecutionContext context) at Microsoft.Crm.Extensibility.PluginStep.Execute(PipelineExecutionContext context)
Any ideas?
You'll need to merge outside assemblies into your plugin dll. Here are the instructions you should follow: Using ILMerge with CRM Plugin Assemblies