Answered by:
Error occurred in deployment step 'Add Solution': Operation is not valid due to the current state of the object

Question
-
hi,
when i was trying to deploy a SP solution from my vs 2012 solution. this error is displayed.
i tried many things like
1) get the wsp and apply power shell cmds to add and deploy, here also it failed:
Add-SPSolution -LiteralPath d:\mywsp.wsp
Install-SPSolution mywsp.wsp -GacDeployment -AllWebApplications -Local
2) restart the timer services and do iisreset and reboot the server. etc .as mentioned in one of the the below blogs:
http://sharepoint1on1.blogspot.in/2014/04/sharepoint-error-occurred-in-deployment.html
http://www.dotnetsharepoint.com/2014/04/error-occurred-in-deployment-step-add.html
but even after doing all these steps, the error still persists!. and am not deploying into a remote server, the dev env is in a VM, where sp 2013, vs 2012, sql 2012 are installed.
just wanna share one note: there is a isue in my search admin component. index was reset due to some reason. and from that time onwards my search full/incremental crawls were not working!
will this cause an issue in my wsp deployment ? i hope it wont, still asking...
can anyone help me how to resolve this error.because this is a show stopper for me for the last few days!
help is highly appreciated!
- Edited by Benjamin KNR Saturday, August 9, 2014 10:19 AM
Saturday, August 9, 2014 10:16 AM
Answers
-
HI Benjamin,please check the below thread that relates to the issue.
http://expertsharepoint.blogspot.de/2014/02/error-while-deploying-solutions-in.html
http://expertsharepoint.blogspot.de/2014/07/deployment-of-solutions.html
Anil Avula[MCP,MCSE,MCSA,MCTS,MCITP,MCSM] See Me At: http://expertsharepoint.blogspot.de/
- Marked as answer by Lindali Friday, August 15, 2014 2:47 AM
Monday, August 11, 2014 6:24 AM -
Please check if solution already exists in Solution gallery, if it exists please retract/remove from Solution gallery.
- Restart "SharePoint Timer Service" on all the servers and try adding solution with -Force
- If you have more then one APP/WFE, please make sure that "SharePoint Timer Service" should running on all the server
If my contribution helps you, please click Mark As Answer on that post and Vote as Helpful
Thanks, ShankarSingh(MCP)
- Marked as answer by Lindali Friday, August 15, 2014 2:47 AM
Monday, August 11, 2014 7:38 AM
All replies
-
This issue cause because of feature activation failure while WSP deployment.
when you create a WSP using visual studio, it creates WSP package with default deployment configuration settings.
Please restrict feature activation configuration, this will help you to troubleshoot this issue.
- Click on Project in WSP and press F4, it will open "Project Properties"
- set "Active deployment Configuration" - as "No Activation"
- you can activate this features in required sequence after deployment using Activate-SPFeature
If my contribution helps you, please click Mark As Answer on that post and Vote as Helpful
Thanks, ShankarSingh(MCP)
- Edited by Nik SS Saturday, August 9, 2014 6:17 PM
- Proposed as answer by Gabriel giraldo lema Monday, January 18, 2016 11:16 AM
Saturday, August 9, 2014 6:17 PM -
the above suggestion didnt work for me. i am getting the same errors.
i tried adding the solution using stsadm -addsolution cmd also.
stsadm -o addsolution -filename "yourProyectName.wsp"
that also failed to execute.
Can any other reason for this?
- Edited by Benjamin KNR Monday, August 11, 2014 6:24 AM
Monday, August 11, 2014 6:03 AM -
HI Benjamin,please check the below thread that relates to the issue.
http://expertsharepoint.blogspot.de/2014/02/error-while-deploying-solutions-in.html
http://expertsharepoint.blogspot.de/2014/07/deployment-of-solutions.html
Anil Avula[MCP,MCSE,MCSA,MCTS,MCITP,MCSM] See Me At: http://expertsharepoint.blogspot.de/
- Marked as answer by Lindali Friday, August 15, 2014 2:47 AM
Monday, August 11, 2014 6:24 AM -
Please check if solution already exists in Solution gallery, if it exists please retract/remove from Solution gallery.
- Restart "SharePoint Timer Service" on all the servers and try adding solution with -Force
- If you have more then one APP/WFE, please make sure that "SharePoint Timer Service" should running on all the server
If my contribution helps you, please click Mark As Answer on that post and Vote as Helpful
Thanks, ShankarSingh(MCP)
- Marked as answer by Lindali Friday, August 15, 2014 2:47 AM
Monday, August 11, 2014 7:38 AM -
Thanks it works
Monday, January 18, 2016 11:17 AM