OK. After steering clear of anything on MSDN I've managed to come up with three posts that all talk about doing this in the way I'd hoped.
It seems that various methods exist for this but -- given that both the Style Library and MasterPage Gallery have versioning, content approval and required check-out settings enabled by default -- we would prefer one which effectively: * First checks if a file is already checked out and checks it back in; * Then checks out, updates, checks in with [generic] comment, publishes and approves. It looks like all this can be managed with a feature receiver. I'd be very interested in hearing from anyone who has managed this. References: http://kartooz.wordpress.com/2009/03/23/how-to-overwrite-sharepoint-master-page-using-a-feature/ http://blog.qumsieh.ca/2008/02/01/how-to-overwrite-existing-sharepoint-files-using-a-feature/ http://stackoverflow.com/questions/451684/sharepoint-problem-saving-a-file-over-an-existing-file-in-a-document-library Regards, Paul Online Developer, ICT CEO Sydney From: [email protected] [mailto:[email protected]] On Behalf Of Paul Noone Sent: Thursday, 29 October 2009 9:06 AM To: ozMOSS Subject: RE: IgnoreIfAlreadyExists does what exactly?? I knew it wasn't me. :) I've already been down the Retract, Delete, Add, Deploy, De/R-eactivate path and it's a time-consuming administrative nightmare. So there's no documented way to simply overwrite an existing file, bump its version, add a check-in comment and publish?? Is this in any way dependent on the library settings? i.e. If approval and check-out are disabled, would you have better luck? And here I was thinking that anything done so simply through the UI could be replciated in code. I find it perplexing that overwtiring the files in the feature folder just 'happens' but that deploying them to a library (or virtual gallery) causes so much pain. Might this work? Write a receiver that deactivates and reactivates the features being upgraded, and add feature deactivated code within those features to remove the list of provisioned files? From: [email protected] [mailto:[email protected]] On Behalf Of Phi Lieu Sent: Wednesday, 28 October 2009 4:02 PM To: ozMOSS Subject: RE: IgnoreIfAlreadyExists does what exactly?? Hi Paul, The description of this attribute should read "Don't throw an exception if the file already exists". There are a couple of blog posts suggesting remove the file before provisioning it. (like this one http://www.sharepointvoodoomagic.com/2009/01/ignoreifalreadyexists.html), or you can manually overwrite the file through code... Regards, Phi Lieu Readify | Senior Developer M: +61 410 516 145 | E: [email protected]<mailto:[email protected]> | C: [email protected]<sip:[email protected]> | W: www.readify.net<http://www.readify.net/> Error! Filename not specified.<http://readify.net/about-readify/press/readify-makes-2008-mis-strategic-100-list/> ________________________________ From: [email protected] [[email protected]] On Behalf Of Paul Noone [[email protected]] Sent: Wednesday, October 28, 2009 3:58 PM To: ozMOSS Subject: IgnoreIfAlreadyExists does what exactly?? Hi all, I'm testing some solution upgrades where I've provisioned modified versions of CSS files. All files in the element manifest initially had the IgnoreIfAlreadyExists="TRUE" attribute applied. As per the MSDN docs (and contrary to logic) this should actually 'provision the view even if the file aready exists at the specified URL'. However it doesn't. As they don't specify a default value I have also tried setting this to false and even removing it altogether. The feature files are being updated to the latest version but not the files in the target libraries (i.e. Style Library). I've tried IIS resets, recycled the app pool, cleared the blobcahce. Still nothing. Anyone have any idea? Another known bug? Regards, Paul Online Developer, ICT CEO Sydney
_______________________________________________ ozmoss mailing list [email protected] http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss
