I have a weird error when trying to deploy a solution via Visual Studio 2010:
Error 1 Error occurred in deployment step 'Add Solution': The solution cannot be deployed. The feature 'XXXX-XXXX-XXXX-XXXX' uses the directory "Solution_Feature1" in the solution. However, it is currently installed in the farm to the directory "WepPartName". Uninstall the existing feature before you install a new version of the solution.
Powershell comes with Get-SPFeature and lists all available Features currently installed. The Feature is listed but has no scope. All other features do have scopes which is the first thing that I recognized.
I tried to uninstall the feature using Uninstall-SPFeature cmdlet:
Uninstall-SPFeature : Cannot find a Feature object with Path or Id: XXX-XXX-XXX-XXX in scope Local farm.
At line:1 char:20
+ Uninstall-SPFeature <<<< -Identity XXX-XXX-XXX-XXX -Force
+ CategoryInfo : InvalidData: (Microsoft.Share...ninstallFeature:SPCmdletUninstallFeature) [Uninstall-SPFeature], S
PCmdletPipeBindException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletUninstallFeature
I have searched for both the GUID and the web part name on the machine it has been previously deployed but with no success.