1

I have created a custom list definition and a list instance via a feature. An EventReceiver on the feature adds some data to the list first checking that it is not already there to prevent duplicates.

The problem is that when I retract the solution or redeploy then the list instance is removed. This is going to cause an issue if a user adds extra data to the list instance and then I need to run another deployment.

My understanding was that the list instance should stay even when the solution was retracted ?

Any ideas how I can get arond this ?

1 Answer 1

6

By default, you should see a Deployment Conflicts dialog box when you redeploy your solution to your development computer; this should have warned you that your existing list instance would be overwritten. To change this behavior, select the List Instance in Solution Explorer, and then change the Deployment Conflict Resolution property (in the Properties window) to None. If this property is set to Automatic, then existing items will be automatically overwritten without the dialog: read more @ social.technet.microsoft.com

enter image description here

1
  • 1
    You are welcome. Don't forget to mark it as answer:( Oct 18, 2013 at 7:28

Your Answer

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

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