Search code examples
visual-studiosharepointsharepoint-2010visual-studio-2013

Visual Studio Unexpectedly Adding Feature on Load


I have a SharePoint 2010 solution in Visual Studio 2013. Every time I close and reopen Visual Studio, a new feature is added to the solution with one list inside it. The list was removed from another feature that it should be in. It is always the same list. As soon as I open the solution this pops up in the Output window before I do anything...

A new feature Feature2 has been added to the project Solution
C:\Code\Solution\Package\Package.package (0,0): Added Feature2 to Package

What is causing this?

I have tried the following:

  1. Recreated the solution and copied all files over - No change
  2. Checked the package and project manifest. - Everything looks okay.
  3. Loaded the project every different way, including unload and reload command. - No change
  4. Recreated the list it likes to isolate into its own feature - No change
  5. Recreated the feature the list should be in but it keeps moving to this new feature - No change
  6. Added a new list and put it after the problem list in the feature - VS then created 3 new features! It took 3 lists out of my feature and put one in each of its own features. I guess I made it angry.

Solution

  • If the lists in the same feature have the same Type ID, the tooling will move the lists into a newly created feature, because the Type must be unique within a feature. You can check the documentation on the ListTemplate element for more information.