I am creating a file using:
File.WriteAllText(FILEPATHNAME, "SOME VALUE");
When creating a file, is it possible to specify a version programmatically? So that if someone were to use FileVersionInfo object they would get the version I specified?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, there is no way to write file version in that way, nor that I’m aware of, honestly.
Possible option is:
Write file version into the file itself within some formatted data.
The most common approach I see, is writing into the beginning of the file or on the first line of the file. So you can fast access that information and decide either process with reading or not.