Is there a .NET supported way of programmatically versioning basic text, excel, word, etc. files in the file system?
More specifically, I am attempting to add a file version attribute to a Crystal Reports file that is streamed from a Server to the Client when the client requests to run a report. FileVersionInfo only supports reading the file version, and File.GetAttributes only gets things like Hidden, Readonly, etc.
Edit: Note that I do not need to keep old versions of these files on the client. I can delete them and replace them with the newer version of the report file. I just need a way to persist the file version on the client side.
string path = @"C:\myReport.rpt";
FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo(path);
Console.WriteLine("File: " + myFileVersionInfo.FileDescription +
'\n' + "Version: " + myFileVersionInfo.FileVersion);
if(File.Exists(path))
{
var fileAttributes = File.GetAttributes(path);
}
Console.ReadKey();
UserDefinedFileAttributeViewinterface, but after the version is created on the file, Java seems to be the only thing that can view this version. I can't look at the file details to view the version I appended to the file.