Welcome to deBUG.to Community where you can ask questions and receive answers from Microsoft MVPs and other experts in our community.
0 like 0 dislike
1.5k views
in SharePoint Server by 22 23 29
edited by

I have created a new SharePoint List instance in Visual Studio, but when deploying SharePoint solution, I got this Deployment Conflict dialog that tells me to resolve the conflict automatically.

Deployment conflicts were detected. Would you like Visual Studio to resolve them for you?
The URL or name of this list instance conflicts with a list instance already on the server. this list instance on the server will be deleted before deploying the new list instance.

SharePoint Deployment Conflicts were detectd

If I clicked on "Resolve Automatically", the old SharePoint list with its content will be deleted and a new List instance will be created again from scratch!

How to deploy SharePoint list instance in Visual Studio without losing old data?


1 Answer

1 like 0 dislike
by 163 204 403
selected by
 
Best answer

How to deploy SharePoint list instance in Visual Studio without losing old data?

Actually, it's normal behavior to get the Deployment Conflicts dialog when redeploying your solution in your DEV environment because to resolve the collisions that may happen when an item on the server has the same name, URL, or ID as an item in your solution package.

  • The default value for Deployment Conflict Resolution is set to "Prompt", so you get the Deployment Conflicts dialog to help you to make a decision about resolving this collision.
    Deployment conflict resolution in visual studio for list instance
  • If you click "Resolve Automatically", you will note that the old SharePoint Instance with its data has been deleted.
  • To avoid the Deployment Conflicts that overwrite the current List instance and remove old data, you have to set the Deployment Conflict Resolution to "None" to ignore collisions for list instances.
    SharePoint list deployment conflict resolution
  • In this case, you can deploy your SharePoint List Instance using Visual Studio without losing your old data.

    See Also Troubleshoot SharePoint packaging and deployment

by 22 23 29
0 0
Thanks Mohamed for your usual help!
If you don’t ask, the answer is always NO!
...