I have a list definition create through XML. I need to add a new column. But when I deploy, it removes all data. Why is this?
-
Can you share your XML of adding data? It will help to understand your query– AnujaAug 26, 2014 at 5:01
-
I don't add data using XML. I am only deploying the list and trying to upgrade– Angelo PerezAug 26, 2014 at 7:00
-
are you deploying it from Visual Studio? If yes, change the Deployment Conflict Resolution for the List Instance to None.– AveenavAug 26, 2014 at 17:20
1 Answer
Using XML is not the best way to create lists and update them and so on. Use a programmatic approach as it is the safest.
You can use a feature receiver and create the list there. Also make upgrades conditionally. I have heard of many people having issues when they use the XML approach.
You can try Deployment Conflict Resolution to None and try but in the long run, this will be more troubling.