I'm trying to develop my fist plugin. When I create a new project I get the following code...
namespace Update_Lead_Company_Name_Plugin
{
using System;
using System.ServiceModel;
using Microsoft.Xrm.Sdk;
public class PreLeadCreate: Plugin
{
public PreLeadCreate()
: base(typeof(PreLeadCreate))
{
base.RegisteredEvents.Add(new Tuple<int, string, string, Action<LocalPluginContext>>(20, "Create", "lead", new Action<LocalPluginContext>(ExecutePreLeadCreate)));
}
protected void ExecutePreLeadCreate(LocalPluginContext localContext)
{
if (localContext == null)
{
throw new ArgumentNullException("localContext");
}
// TODO: Implement your custom Plug-in business logic.
}
}
}
And I'm receiving the following error, without adding even a single line to the code...
Error 2 The type or namespace name 'Plugin' could not be found (are you missing a using directive or an assembly reference?) \\SERVER\UserShares\GaryMonk\Dynamics CRM Projects\Update Lead Company Name\Update Lead Company Name Plugin\PreLeadCreate.cs 20 33 Update Lead Company Name Plugin
Thank you for the help!!
Gary