NullReferenceException for Summary property of VersioningFile


Hello everyone!

I've run into something that I haven't seen before.

When I create a new VPP file programmatically (using the CreateFile method of a VersioningDirectory object) the resulting VersioningFile object throws a NullReferenceException when getting the Summary property.

The stack trace suggests a VersioningFileSummary cannot be created.

I've added additional meta data properties in FileSummary.config and I can properly edit the meta data (including my custom properties) if I upload a file through File Manager, this problem only occurs when creating files programmatically.

I've tried Anders Hattestad's code (from this thread:, but that didn't solve the problem.

My gut tells me something has gone awry in the DDS, but I'd greatly appreciate any feedback if you've seen this before!


Jan 29, 2013 13:45

Yay! My brother in arms Thomas Krantz solved it!

Before you can access the Summary property you have to write some bytes to the VersioningFile (!), as soon as you've done that you can set Summary meta data.

I'm going to go ahead and chalk this up as a bug... Although it has probably been this way since CMS 5? :)

Jan 29, 2013 14:14
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.