Welcome to deBUG.to Community where you can ask questions and receive answers from Microsoft MVPs and other experts in our community.
1 like 0 dislike
2.3k views
in SharePoint Server by 37 41 48

In SharePoint 2019, after uninstalling a SharePoint Solution using Uninstall-SPSolution  and trying to add the same solution using Add-SPSolution PowerShell, I got this error Add-SPSolution: A solution with the same name or id already exists in the solution store.

Add-SPSolution :  A solution with the same name
"webparts.wsp" or id "6ca32b40-73f1-4b39-8ed3-121ff6d46de5"
already exists in the solution store.
At line:1 char:1
+ Add-SPSolution -LiteralPath "c:\webparts.wsp"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (Microsoft.Share...dlet
   AddSolution:SPCmdletAddSolution) [Add-SPSolution], ArgumentExc
  eption
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCm
   dletAddSolution

Add-SPSolution A solution with the same name or id already exists in the solution store.

How to fix this error in SharePoint 2019?


1 Answer

2 like 0 dislike
by 159 200 385
selected by
 
Best answer

Solving: Add-SPSolution: A solution with the same name or id already exists in the solution store.

This error "Add-SPSolution: A solution with the same name or id already exists in the solution store." occurs if you didn't uninstall your SharePoint WSP solution completely from your farm.

How to uninstall a SharePoint WSP solution in SharePoint 2019?

To uninstall SharePoint Solution (WSPs) in SharePoint Server, you have to do the below two steps

  1. Retract SharePoint solution (Uninstall-SPSolution)
    • Ex: Uninstall-SPSolution -Identity contoso_solution.wsp
  2. Remove SharePoint solution (Remove-SPSolution)
    • Ex: Remove-SPSolution -Identity contoso_solution.wsp

For more details, Please check How to Uninstall SharePoint WSP Solutions in SharePoint 2019?

How to install a SharePoint WSP solution in SharePoint 2019?

Once you have completely removed your SharePoint solution, you have to add the new one like the following:

  1. Add a SharePoint WSP Solution (Add-SPSolution)
    • EX: Add-SPSolution -LiteralPath "C:\Solution\Qassas.wsp"
  2. Install a SharePoint WSP Solution (Intsall-SPSolution)
    • Ex: Install-SPSolution –Identity Qassas.wsp –WebApplication http://Server/ -GACDeployment

For more details, Please check How to install SharePoint WSP Solutions in SharePoint 2019?


See Also

If you don’t ask, the answer is always NO!
...