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:
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.
It is because features cannot contain list templates that have identical values for Type
. This is explained here: https://msdn.microsoft.com/en-us/library/office/ms462947.aspx
Type
Optional Integer.
Provides a unique identifier for the template. This identifier must be unique within the feature, but need not be unique across all feature definitions or site definitions. For a list of the default list template types, see SPListTemplateType.
You will probably find that your Elements.xml file for your list templates contains the same value for Type.
To fix this, you will need to edit the Elements.xml files of the list template and the list instance.
I have started to choose numbers over 1000 to avoid conflicts (Although 1100, 1200, 1220 and 1221 are system types)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With