Question

I had created a project that defined some content types and lists via XML. After it's release we need to make some updates to this feature to include some new functionality. My concern is that since this was all done via XML major issues could occur.

The lists initially created are critical. By doing an upgrade-spsolution is it going to tear down the lists and try to provision new ones or will it see they already exist and do nothing? The updates aren't touching the lists themselves, but updating some ASPX pages, javascript files, and adding in localization.

Since this project, I've moved to creating and provisioning lists via feature activation code instead of static list instances, I could handle it all in the feature upgrading event receiver if that were the case.

Was it helpful?

Solution

Lists defined via XML get wiped out if you choose "Deploy" from Visual Studio, but remain intact using Update-SPSolution. If you are only changing deployed files, pages, or code in your assembly, your changes should get pushed through with an Update-SPSolution.

The only thing you may need to consider is that files that were deployed to SharePoint via Modules in SP 2010 aren't automatically overwritten using Update-SPSolution so you will have to remove them first if there are modifications to them. This is not the case with files deployed to the file system. Important to note is that the Update-SPSolution command does not trigger the SPFeatureReceiver.FeatureUpgrading event so that is not a valid approach to removing these files. See: Does Update-SPSolution trigger a SPFeature.Upgrade()?

In SP 2013 you can use the ReplaceContent="TRUE" attribute to handle this problem. See: Overwriting ghostable files in SharePoint 2013 libraries using feature elements (no code)

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top