1

I am developing a desktop app in c# using CSOM to run against an o365 SharePoint solution.

I managed to get the version, however in testing I have noticed that I am always getting the second newest version instead of the newest. Even when logging out every single version of the document the current version (ver 1.0) does not seem to be visible see code and screenshot below for clarification.

//Code to get all versions the code used to get all versions

//Result

The output from the code, does not reach version 1

//Version History for the document The documents version history, reaches version 1

1 Answer 1

0

Yes, you need to output the latest version of the file out the foreach:

// Get the latest version of the file

checkedListBox4.Items.Add("this" + item["FileRef"].ToString() + ":" + newsItemFile.UIVersionLabel);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.