I tying to attach event receiver via powershell but facing this issue:
$list = (get-spweb http://site/it).lists['IT Support Request'] $def = $list.EventReceivers.Add() $def.Assembly = "$SharePoint.Project.AssemblyFullName$" $def = $list.EventReceivers.Add() $def.Assembly = "$SharePoint.Project.AssemblyFullName$" $def.Class = "esolution_STG.CreateITSupportTicket.CreateITSupportTicket" $def.Type = [Microsoft.SharePoint.SPEventReceiverType]::ItemUpdated $def.Name = "CreateITSupportTicketItemUpdated"; $def.Synchronization = [Microsoft.SharePoint.SPEventReceiverSynchronization]::Synchronous $def.Update()
Here is the issue:
Exception calling "Update" with "0" argument(s): "Could n assembly '.Project.AssemblyFullName$' or one of its depen cannot find the file specified." At line:1 char:1 + $def.Update() + ~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) , Metho + FullyQualifiedErrorId : InvalidOperationException
How to fix this issue?