Deploying list instances without overwriting existing list instances
-
Wednesday, March 14, 2012 12:59 PM
hey there,
I built a custom list definition based on a content type and created a list instance using the visual studio sharepoint tools.
Everything works perfectly fine. However retracting the solution and re-deploying it always causes the custom list instances to be removed and re-created. It's not much of an issue in my development system as there is no content... but it's definitely nothing I want in my production environment!What's your approach to solve that problem?
Do I need to create the list instances programatically (OnFeatureActivated?) and check if an instance already exists? Is there no declarative solution?
All Replies
-
Wednesday, March 14, 2012 1:23 PMAnswerer
-
Wednesday, March 14, 2012 3:05 PMOk I'll check that. Still... how am I supposed to deploy fromwithin Visual Studio without erasing all my precious content again and again?
-
Wednesday, March 14, 2012 3:11 PMAnswerer
Well you can set the "deployment configuration" to "none" in your solution properties, with that it won't activate automatically your solution.
your can to use external plugin for visual studio as the very good cks one. this one add some useful links like one to copy the assembly in the GAC and another one to copy files on the SharePoint Root .
With that if you are juste updating your code, you don't need to deploy the solution package again and again ;)
- Marked As Answer by Qiao WeiMicrosoft Contingent Staff, Moderator Friday, March 23, 2012 11:24 AM
-
Wednesday, March 14, 2012 3:16 PMAnswerer
check this post
http://sharepoint.stackexchange.com/questions/12208/updating-a-list-instance
maybe my development environment is customized for no erase (can't say, it's an old one ^^)

