0

I am developing a SharePoint solution including some list definitions, list instances, content type and a workflow (more to come...) Is it best practice to keep everything in one solution (WSP)? If I remove the solution from a SP application, all the data/document get deleted. Is it really necessary to create the lists manually on SharePoint instead of let the WSP create these instances? Or is it best practice to put everything possible into the solution package and just take care of not uninstalling the solution from the application?

1

1 Answer 1

1

Putting list definitions, instances, content types etc in the WSP package prevents one from maintenance headaches. Imagine someone creating lots of things by hand and forgetting to maintain a proper document. Moreover, it may result in gaining significant time to deploy compared to doing things by hand every time.

Second, it is not always true that uninstalling a solution will get rid of everything present in the solution. In fact there are always some left overs unless you take care of them on your own either in code or some other way.

Third, depending on how complex the solutions is, the solution package will need to stay deployed in the farm almost always in order for the things to work properly. This is expected. Even if you do everything by hand some dependencies need to be maintained. Consider you create two lists from UI and use one of the columns as lookup column in one list referencing the other list. If you delete the second list later, the lookup column in list one will not work.

3
  • Totally agree with your answer. But sometimes it happens that SharePoint doesn't want to be my best friend so then I have to re-install a solution. At that moment i would loose all the data. But looks like i'll have to deal with that. Thanks for your answer!
    – stromflut
    Feb 18, 2014 at 12:29
  • 1
    In this case you can exclude some items in the Feature and prevent from deploying... e.g. exclude list instace
    – lex
    Dec 30, 2014 at 14:53
  • Thanks for the information - I also want to prevent my list from being deleted and deployed again. But when I remove my ListInstances from my features, the Lists won't be deployed anymore. E.g. my AllItems.aspx site won't be found. Which elements do I have to remove from the feature to prevent my lists from being deleted? Thanks!
    – D. Müller
    Feb 2, 2016 at 10:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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