32

I'm getting that old familiar error when trying to deploy my SharePoint solution via Visual Studio:

Error occurred in deployment step 'Add Solution': A feature with ID {Guid} has already been installed in this farm. Use the force attribute to explicitly re-install the feature.

I know I've run into this before, and previously I found somewhere in Visual Studio (in the properties tab possibly) where it let you check a box to enable the "force" flag when it deploys.

I just installed the latest SharePoint and Office Developer Tools for Visual Studio. I now can't seem to find that option.

Am I just missing it somewhere or has it disappeared?

Thanks.

47

If you double-click on the feature (NameofFeature.feature), in your solution. You'll see a properties window come up - as a window that details the title, description, scope, items in solutions, and items in the feature. In the properties window, you'll see an option titled 'Always Force Install'. By default, it is set to False. You can configure that to be set to True.

  • Thanks. I think my upgrade screwed up VS in some way. I had to reinstall to get this to appear again. – MgSam Mar 6 '13 at 18:56
  • @Quinn Johns I am able to see all other option except "Always Force Install". Can you please suggest any other alternative? – Akhilesh Apr 11 '18 at 5:33
13

You can do it via the XML editor as well!

Steps:

  1. Go to your Features in your project.

  2. Open the feature.template.xml file

add AlwaysForceInstall="TRUE" to the below tag

<Feature xmlns="http://schemas.microsoft.com/sharepoint/" AlwaysForceInstall="TRUE">

Now try to deploy the code.

  • I did as said above. But same Error. – Akhilesh Apr 11 '18 at 5:35
  • @Akhilesh still having the issue? – Muhammedh Apr 27 '18 at 8:44
  • my pleasure brother :) – Muhammedh May 10 '18 at 8:36
1
  1. Double click on the feature....

  2. then in the properties window make

  3. ALWAYS FORCE INSTALL = true...

    and there u go.....

1

You can solve it as bellow, It works.

Steps:

  1. Open AssemblyInfo.cs from Project Solution.
  2. Change assembly version from existing.

    [assembly: AssemblyVersion("1.0.0.0")]

    To

    [assembly: AssemblyVersion("1.0.0.1")]

  3. Build Project and Deploy it.

  • Isn't this going to create a lot of DLLs in the GAC / Bin? Please confirm. – Muhammedh Jun 19 '14 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.