In my SharePoint 2013 solution (created from visual studio), I created a project that contains all the artifacts form my solution: I put in this project custom fields, custom content types as well as custom lists that my solution requires.
Then I created 3 features in this project :
The first feature which is a site scoped feature contains all the custom content types and custom fields of my solution, its name is Feature_ContentTypes_Fields.
The second feature is a Site Scoped feature and contains all list definitions for my custom lists ( in which I added "Feature_ContentTypes_Fields" as feature activation dependency) , its name is Feature_ListDefinitions.
The last feature which is a web scoped feature manages the creation of all list instances of my custom lists ( in which I added "Feature_ListDefinitions" as feature activation dependency) , its name is Feature_ListInstances.
I can successfully build the solution, but it then fails to deploy.
Here is the output of visual studio while deploying the solution:
------ Deploy started: Project: Model, Configuration: Debug Any CPU ------ Active Deployment Configuration: Default Skipping deployment step because a pre-deployment command is not specified. Recycle IIS Application Pool: Recycling IIS application pool 'SharePoint - 1111'... Retract Solution: Deactivating feature 'Model_Feature_ListDefinitions' ... Deactivating feature 'Model_Feature_ContentTypes_Fields' ... Retracting solution 'model.wsp'... Deleting solution 'model.wsp'... Add Solution:
Adding solution 'Model.wsp'... Deploying solution 'Model.wsp'...
Activate Features: Activating feature 'Feature_ContentTypes_Fields' ... Activating feature 'Feature_ListDefinitions' ... Activating feature 'Feature_ListInstances' ... Error occurred in deployment step 'Activate Features': Cannot complete this action.
Here you find the manifest of the list definitions feature:
<Feature xmlns="http://schemas.microsoft.com/sharepoint/" Title="Model ListDefinitions" Id="ab765f54-0a2b-4aa9-b87c-f5066849dc4a" Scope="Site"> <ActivationDependencies>
<ActivationDependency FeatureId="10412a7b-e033-43a0-a485-1c4f4c83ccca" FeatureTitle="Model ContentTypes_Fields" /> </ActivationDependencies> <ElementManifests>
<ElementFile Location="CVs\EditDlg.htm" />
<ElementManifest Location="CVs\Elements.xml" />
<ElementFile Location="CVs\FileDlg.htm" />
<ElementFile Location="CVs\Repair.aspx" />
<ElementFile Location="CVs\Schema.xml" />
<ElementFile Location="CVs\Upload.aspx" />
<ElementManifest Location="Notes\Elements.xml" />
<ElementFile Location="Notes\Schema.xml" />
<ElementManifest Location="Activites\Elements.xml" />
<ElementFile Location="Activites\Schema.xml" />
<ElementManifest Location="Demandes RDV\Elements.xml" />
<ElementFile Location="Demandes RDV\Schema.xml" />
<ElementManifest Location="Entretiens\Elements.xml" />
<ElementFile Location="Entretiens\Schema.xml" />
<ElementManifest Location="Formations\Elements.xml" />
<ElementFile Location="Formations\Schema.xml" />
<ElementManifest Location="Idees\Elements.xml" />
<ElementFile Location="Idees\Schema.xml" />
<ElementManifest Location="Mensualites\Elements.xml" />
<ElementFile Location="Mensualites\Schema.xml" /> </ElementManifests> </Feature>
and the manifest of the list instances feature:
<Feature xmlns="http://schemas.microsoft.com/sharepoint/" Title="Model ListInstances" Id="d61d526e-0e16-4bd4-87e1-1479d405e230" Scope="Web"> <ActivationDependencies>
<ActivationDependency FeatureId="ab765f54-0a2b-4aa9-b87c-f5066849dc4a" FeatureTitle="Model ListDefinitions" /> </ActivationDependencies> <ElementManifests>
<ElementManifest Location="FormationsInstance\Elements.xml" />
<ElementManifest Location="EntretiensInstance\Elements.xml" />
<ElementManifest Location="Demandes RDV Instance\Elements.xml" />
<ElementManifest Location="CVsInstance\Elements.xml" />
<ElementManifest Location="ActivitesInstance\Elements.xml" />
<ElementManifest Location="MensualitesInstance\Elements.xml" />
<ElementManifest Location="NotesInstance\Elements.xml" />
<ElementManifest Location="IdeesInstance\Elements.xml" /> </ElementManifests> </Feature>
Can anyone help me please ?