I have a content type, a list definition based on the content type and also a list instance.
Lets suppose thats all I have in the project. Its on the dev server, everytime I deploy using vstudio the list ITEMS are gone.
How can I avoid this?
|
I have a content type, a list definition based on the content type and also a list instance. Lets suppose thats all I have in the project. Its on the dev server, everytime I deploy using vstudio the list ITEMS are gone. How can I avoid this? |
|||
|
|
|
When developing solutions for SharePoint 2010 Visual Studio automaticly resolves conflicts when redeploying a solution. The conflict resolution for a list-instance is to delete the list and then recreate it on redeployment. To keep your list, disable automatic conflict resolution. See this blog for images Beware that not resolving conflicts may result in un-updated lists. If it is a limited set of items you could consider adding them to the list instance definition, so that the items are (re)created when the list is instantiated. And simple example of this van be found on MSDN. |
|||
|
|
|
You can also make some check for existence of your list in feature receiver while adding list.. If exist - skip list creation. |
|||
|