Tag Info

Hot answers tagged

46

Just moved (drag & drop) a file in Explorer View from one document library to another, and it did retain previous versions! Obviously both libraries need to have versioning enabled. Try it yourself. EDIT: note that it ONLY retains the versions if you MOVE the files. It does not do so when you perform a COPY!


8

As far as I know, the only way to upgrade a feature is by calling the Upgrade() method. Any other operation, including deactivation/reactivation, solution upgrade/update etc should in no way force a feature upgrade. I have upgraded some feature after a solution update in the past and they were NOT automatically upgraded by the Update-SpSolution cmdlet (I had ...


7

Last year I added functionality to Chris O'Brien's SharePoint Content Deployment Wizard to copy documents from one library to another. I'm pretty sure I tested that versioning copied over as well. Have a try of that and if you have any problems using it please leave me a comment here and I'll update my answer with more info.


6

SharePoint will store the full copy of any document/page for each version of that document/page. In some cases (as with Wiki pages), SharePoint will highlight content to show what changed from version to version, but with documents and pages, the entire file is stored in the content database. This is why storing multiple different versions of large documents ...


5

It is strongly discouraged to use assembly versioning in SharePoint unless you are prepared to manage all old SafeControl entries. Using versioning will only cause the errors you're seeing. Just don't use it. A better approach is to use the AssemblyFileVersion attribute. This is what I, and most of the community uses today to manage version numbers on ...


5

SharePoint always stores the full file. It never tries to do diffs. I haven't seen it documented regarding Site pages anywhere but if you ON A DEV BOX tries this: Create a new Team site with relative url "Team" Modify Home.aspx in SharePoint Designer Turn on Major/minor versioning of "Site Pages" Check out Home.aspx Modify Home.aspx in SharePoint Designer ...


4

As Anders mentions in his answer, my company SharePoint Products has a tool named CopyMove for just that. It is free to use for 1 named user - only organizations that need to offer the tool to their end-users will need to purchase a license. The product can copy/move documents, list items and folders with no loss of metadata, version history and ...


3

If you like the console/windows idea, you don't have to be limited to the client OM. You can create one using the server OM, you just have to run the console/windows app on one of the sharepoint servers. I personally would go with the console app using the server om route for this type of maintenance. If you feel like you would need to run this a lot or ...


3

This is "by design" (for better or worse). The only workaround at this stage is to use JavaScript that can target this particular message. Trying to hide it using CSS is a bad idea as it will apply to all status bar messages which are very important for end users to see. There's an example script on Sohel's Blog: <script type="text/javascript"> ...


3

a way to move documents through doc lib is to use the Content Deployment API. using objects like SPExport and SPImport the copy, move actions of the content site and structure (sitemanagement.aspx) are performed using this API. and you can set that you want to keep the versions!


3

I know of no OOTB way to do this, so you would have to code this functionality yourself. I know that Lars Fastrup has created a tool that does just what you want: CopyMove for SharePoint It also has a web service API. hth Anders Rask


3

You'll have to make some kind of On Item Update functionality, whether it be a workflow (can be created via SharePoints userinterface) or an eventreceiver (custom code bound to lists via feature activation or console job) to get the current value of A and insert it into B.


3

This link has step-by-step instructions to restore your newform.aspx. Open the broken form and another working form in SP Designer, remove the ListFormWebPart from the page, then copy the ListFormWebPart from the unbroken page. You also have to update the List GUIDs to make sure the web part is pointing to the correct list. ...


3

Storage space. It's a good practice to use site quotas to manage growth. When you have versioning and don't have limits, each version adds additional storage as Sharepoint is making a copy of the original. In one document library, I had seen a file with 197 versions with no finite limit set. this one small file accounted for nearly 500 MB against the site ...


3

I don't see why you can't use the OOB versioning functionality. If you enable versioning and content approval for your library and turn on major and minor versions, then whenever a document is submitted, it is marked as Draft and it gets assigned a minor version. You can then use a standard approval workflow (or customize it to suit your needs) to approve ...


3

Use SPListItem.UpdateOverwriteVersion() Updates the item without creating another version of the item. SPListItem.SystemUpdate method More Explanation


2

I have found that restoring a previous version will create a new version with information from the 'selected' version. It will not 'restore' and delete the 'current' version. IE: Version 1 Version 2 Version 3 If you restore version 1, it will become version 4, all 4 version will be available afterwards.


2

make sure that you use the SPFile object to get the Versions property from like below. Restoring an SPListItem will only restore the metadata not the binary document. SPListItem item = ... SPFile file = item.File; int versionCount = file.Versions.Count; if (versionCount > 0){ file.Versions.Restore(1); } Cheers /WW


2

The Content and Structure worked fine for me. Moving individual documents from one library to another captures all versions. Assuming, of course, versioning is configured the same on both libraries. That bit me the first time - the destination had Major, but the source had Major/Minor. Once the destination was switched to Major/Minor, documents came over ...


2

SP 2010: Go to Document Library Settings -> Versioning Settings -> Require Check Out Set to no MOSS 2007: Document Library -> Settings -> Document Library Settings -> Versioning settings -> Require Check Out Set to no Also follow this link to have more idea


2

Those are the only ones I recall that are versioned by default. As far as what to version, that depends on the governance policies and the specifics of the functionality of the site in question. Not everything needs to be version controled. My general rule of thumb is if there is something more than one person is going to be working on over the span of a ...


2

From SharePoint Server 2010 capacity management: Software boundaries and limits Major versions - 400,000 - Supported - If you exceed this limit, basic file operations—such as file open or save, delete, and viewing the version history— may not succeed.


2

Yes. You can customize or create new permission roles (ex. you can customize the contribute role to disallow deleteing items) See: http://office.microsoft.com/en-us/sharepoint-server-help/manage-permission-levels-HA010117209.aspx Versioning is applied on a per-item basis. So, in your example, each Item would be at version 1 when uploaded. Suppose an item ...


2

Darko Milevski has a post on this exact issue: http://mkdot.net/blogs/darko/archive/2011/04/05/sharepoint-document-versions-and-how-to-manage-delete-them.aspx He uses the following script to remove the versions. $snap = Get-PSSnapin | Where-Object {$_.Name -eq ‘Microsoft.SharePoint.Powershell’} if ($snap -eq $null) { Add-PSSnapin ...


2

You can call SystemUpdate(false) method to update the item without incrementing the version number. More information here: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splistitem.systemupdate.aspx


2

As others have said, use AssemblyFileVersion and the reasons why :- KB556041 - How to use Assembly Version and Assembly File Version Suppose you are building a framework assembly for your project which is used by lot of developers while building the application assemblies. If you release new version of assembly very frequently ... and if assemblies ...


2

The ribbon performs three checks before enabling the Version History button: Only one element has been selected The user has ViewVersions permissions to that item The List has versioning enabled You (or someone with access) can check these settings in powershell $w = Get-SPWeb SITE_URL $l = $w.Lists["Shared Documents"] $l.EnableVersioning Should show ...


2

There are (at least) two ways to get the content of an old version of a file, both go through the SPFileVersion from item.File.Versions. If you want to use the content in your code, then you can call SPFileVersion.OpenBinary (or OpenBinaryStream) If you want to allow the user to download the content then you can provide a link based on SPFileVersion.Url ...


2

A little iteration trough all webs and all lists checking if versioning is enabled and if so setting majorversion limit to 2. Then you need to update each item to delete all other versions: $site = Get-SPSite http://mycoolsitecollection $webs = $site.AllWebs foreach ($web in $webs) { foreach($list in $web.Lists) { if($list.EnableVersioning) { ...


2

You can't do that on a single document library. If you have SharePoint Server 2010, you could use the content organizer to have a single place where documents are submitted and based on your metadata (enable versioning yes/no) you could put the documents in two different libraries, one with versioning and one without.



Only top voted, non community-wiki answers of a minimum length are eligible