Error occurred in deployment step Add Solution

Issue Occurred while deploying the WSP using Power Shell getting below error:-

Power shell Error Message :: Error occurred in deployment step 'Add Solution': Operation is not valid due to the current state of the object.

Most of the article suggest below solution and which solved their issues also but No Luck

  1. Restart "SharePoint Timer Service" on all the servers.
  2. Deployment Solution with –Force parameter
  3. Set "Active deployment Configuration" - as "No Activation"


  

ULS Log Message :: The timer service could not initialize its configuration, please check the configuration database

Most of the article suggest below solution and which solved their issues also but No Luck
  1. Clear the Config Cache from each Server  Location of the file:- C:\Documents and Settings\All Users\Application Data\Microsoft\SharePoint\Config\<guid>\
  2. Stop the Administration and Timer service from each server one by one.
  3. Delete all XML files in the folder at defined location C:\Documents and Settings\All Users\Application Data\Microsoft\SharePoint\Config\<guid>\  (not the folder itself only files)
  4. Open “Cache.ini” and write the number 1 instead of the existing number (you might want to make a note of it).
  5. Start the Administration and Timer service from each server one by one.
  6. Wait for a minute or two and see if the folder starts to fill up with xml files. Xml files should start  appearing.

 Resolution:-

 Actually Issue - Folder was missing from the location:- C:\Documents and Settings\All Users\Application Data\Microsoft\SharePoint\Config - which only consist Cache.ini file .

  1. Stop the Windows SharePoint Services Timer service on ALL servers in the farm.
  2. On the server configured for Indexing, browse to %ALLUSERSPROFILE%\Application Data\Microsoft\SharePoint\Config.
  3. Open the Registry editor and navigate to the following key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\15.0\Secure\ConfigDB.
  4. Take a note of the Guid value for the Id item as shown below

  5.  
  6. Re-create the cache folder giving it the title matching the Guid value retrieved from the Registry.
  7. You can now re-start the Windows SharePoint Services Timer service on the current server.  You  should see xml files appear in the folder shortly after the service starts.
  8. Repeat all the steps above for all other servers in your farm.


Happy Coding..

No comments:

Post a Comment