Hi there,
There are two Servers in SharePoint Farm. One is Application, another is Front-End. We have a custom Event Receiver will be installed in the Custom List. I found out something wired. The first time, we install the Event Receiver by PowerShell command as follows:
- Add-SPSolution c:\code\SharePointProject2\bin\debug\SharePointProject2.wsp
- Install-SPSolution -Identity SharePointProject2.wsp - Force -GACDeployment
Everything works well. Second time, we have a update. so we use Update-SPSolution to update our Event Receiver. No any error show up. Actually, It didn't be updated. So we restart, clear SharePoint cache. --> Cannot work well.
Finally, we retracted the solution from CA and remove it. We install the Event Receiver once again by PowerShell command.
- Add-SPSolution c:\code\SharePointProject2\bin\debug\SharePointProject2.wsp
- Install-SPSolution -Identity SharePointProject2.wsp - Force -GACDeployment
After step 2, still cannot update our Event Receiver to new version. We change the command to Install-SPSolution -Identity SharePointProject2.wsp -Local - Force -GACDeployment and use this command to execute on two machines separately. We successfully updated to the latest version and worked well.
But when I used the following command to check the Event Receiver status in custom list:
- $Web = Get-SPWeb "http://xxx.xxx.xxx"
- $List = $Web.Lists["xxxxxxxx"]
- $List.EventReceivers | Select Id, Type, Assembly, Class | FL
PowerShell cannot find out any Event Receiver was installed in this List (Even I use any tools to check the Event Receiver in this list.). but It really can be executed in the custom list. Does anyone run into this situation before.
Thanks