publishingWeb.PagesList.EnableModeration = false; publishingWeb.PagesList.EnableVersioning = true; publishingWeb.PagesList.MajorVersionLimit = 10; publishingWeb.PagesList.EnableMinorVersions = false; publishingWeb.PagesList.ForceCheckout = false; publishingWeb.PagesList.Update();
While debugging, I can see that PagesList is taking my changes on the publishing site I'm targeting, but once Update() is called, the changes revert back to their former values.
My code is running as administrator with access to change the list. Elsewhere in my code I'm able to change other things, such as the quicklaunch navigation properties.
I'm testing this piece of code from a console app now, but it's not working within a stapled feature scoped at the farm level and stapled to a publishing site.