Quantcast
Channel: SharePoint 2013 - Setup, Upgrade, Administration and Operations forum
Viewing all articles
Browse latest Browse all 21070

when try to add event receiver to production facing this issue

$
0
0

I have create event receiver in dev environment and its working fine. But when try to add in production facing:

S C:\Users\spfarmadmin> $spWeb =Get-SPWeb-Identity http://site/hr

PS C:\Users\spfarmadmin> $spList = $spWeb.Lists["EmpEntyExit"]

PS C:\Users\spfarmadmin> $spEventReceiver = $spList.EventReceivers.Add()

PS C:\Users\spfarmadmin> $spEventReceiver.Assembly = "$SharePoint.Project.Assemb lyFullName$"

PS C:\Users\spfarmadmin> $spEventReceiver.Class = "my_STG.AddTaskand_SubTask .AddTaskand_SubTask"

PS C:\Users\spfarmadmin> $spEventReceiver.Name = "AddTaskand_SubTaskItemAdded"

PS C:\Users\spfarmadmin> $spEventReceiver.Type = 10002

PS C:\Users\spfarmadmin> $spEventReceiver.SequenceNumber = 1000

PS C:\Users\spfarmadmin> $spEventReceiver.Synchronization = 1

PS C:\Users\spfarmadmin> $spEventReceiver.Update() Exception calling "Update" with "0" argument(s): "Could not load file or assembly '.Project.AssemblyFullName$' or one of its dependencies. The system cannot find the file specified." At line:1 char:1 + $spEventReceiver.Update() + ~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : InvalidOperationException

PS C:\Users\spfarmadmin>


Viewing all articles
Browse latest Browse all 21070


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>