Error:
Activate-Feature : Error activating feature …<featurename>……… at …<siteURl>……..The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Issue has caused when using PowerShell script to retract and deploy WSP solution, WSP deploys successfully but somehow it get failed to activate a feature with event receiver I am starting the services as below:
Stop-Service -Name “SPAdminV4”
Start-SPAdminJob
Start-Service -Name SPAdminV4
WaitForSolutionDeploymentJobToFinish $name
Note: I have not found any issue when I do fresh deployment instead retraction/deployment.
I even it works file when I retract the solution in separate script and do deployment with new powershell instance
I have found following references while investigating: http://sisharepoint.wordpress.com/2010/03/26/getting-around-gac-problems-when-you-deploy-sharepoint-solutions-with-powershell/ http://blogs.msdn.com/b/briangre/archive/2011/02/17/sharepoint-2010-visual-studio-solution-deploy-deployment.aspx
Please guide me to resolve this issue