The feature name XXX already exists in SharePoint. You need to rename the feature before solution deployment can succeed.

From time to time when I try to deploy a SharePoint project from Visual Studio 2005 I’m getting this error:

The feature name XXX* already exists in SharePoint. You need to rename the feature before solution deployment can succeed.

Solution
Whenever I get this (annoying) error I go to C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\ and remove the directory named XXX*. Sometimes then I need to restart Visual Studio or even log off and on again (on my Windows account).

17/102008
Sometimes restarting Visual Studio does the job.

* is the name of the module that should be deployed

 The feature name XXX already exists in SharePoint. You need to rename the feature before solution deployment can succeed.

13 Responses to “The feature name XXX already exists in SharePoint. You need to rename the feature before solution deployment can succeed.”


  • Bookmarked for future reference. TY

  • I wanted to comment and thank the author, good stuff

  • Why does Microsoft hate us so much?

  • Great Jarosław Dobrzański, You same my precious time by giving this answer.

    thank you

  • my God, i thought you were going to chip in with some decisive insght at the end there, not leave it with ?we leave it to you to decide?.

  • Hi. I followed ur steps above, however, i encountered another error.

    The solution cannot be deployed. Directory “WebParts” associated with feature ‘d8c7e2e1-0027-424f-bda3-f47d363d97cc’ in the solution is used by feature ‘bb678af2-5e33-4dd1-a555-53f5f146c274′ installed in the farm. All features must have unique directories to avoid overwriting files.

    How do i solve this error?

    Thanks if you could help me.

  • Donna,

    I can’t help you with that. This seems to be a different problem, which I haven’t experienced.

    Jarek

  • Did you solve that issue Donna? I have the same type of problem.

  • Now eight weeks into my first Sharepoint Development experience, and hopefully my last ! The technology is a joke.

    This error was only one of tens of simiolar annoying ones so thanks for supplying answer.

    Conclusion: Sharepoint sucks..

  • @donna , @Triston – You probably already solved the issue, but for the next readers:

    In order to fix your issue, just delete the ‘obj’, ‘pkg’ and ‘bin’ folders in the project main directory.

    Shay

  • After following your step, i am getting below error:
    Object reference not set to an instance of an object” :(

    Please advice.

  • “Hi. I followed ur steps above, however, i encountered another error.

    The solution cannot be deployed. Directory ?WebParts? associated with feature ?d8c7e2e1-0027-424f-bda3-f47d363d97cc? in the solution is used by feature ?bb678af2-5e33-4dd1-a555-53f5f146c274? installed in the farm. All features must have unique directories to avoid overwriting files.

    How do i solve this error?

    Thanks if you could help me.

    To fix this, try putting the folder back that you deleted from the Templates folder, then C:\Program Files\Common Files\microsoft shared\Web Server Extensions\12\BIN>stsa
    dm -o uninstallfeature -name

    then delete the folder again from the Templates folder, then try to deploy again.

Leave a Reply