2

I have a project in visual studio to be deployed in sharepoint 2013, every time i change the field's data type or add another field in the list, when i run visual studio, it always retract all the data. Is that normal?

Thanks

3

Yes, it's a normal behavior. In Visual Studio Solution, you have added SharePoint list. That list is added in SharePoint feature in solution. You can check this by clicking on Features folder. You will find features inside that and in one of the feature you will find your list definition and list instance. These both are added under Items in the Feature: section in feature. So every time you deploy your solution, it will retract your existing list and create new list during feature activation process.

To avoid this issue during development phase of the project, you can deploy first time your solution normally as currently you are doing. It will create new list in site. After that move your list instance from Items in the Feature: to Items in Solution in feature and try to deploy solution. It will not retract your existing list.

enter image description here

0

It's normal. Use powershell command Update-SPSolution instead of redeploy in visual studio.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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