I'm looking for a way, just about any way really, to set the file version of a file. Clearly, programatically would be best, but at this point any way would be acceptable.

What I have more specifically, is a file generated dynamically using CodeDOM. The version of this file is always 0.0.0.0. I need to be able to set the version to say 1.0.9.17 or something. You get the idea.

I don't know why this is turning out to be so difficult. Any help or suggestions would be very appreciated. Thanks!

The version is set by the AssemblyFileVersion property { or attribute, call it as you like }, you create a new CodeAttribute and add to the AssemblyFileVersionAttribute a new argument in which you specify the version you want as a string inside a CodePrimitiveExpression , then add it all to the CodeUnit as a custom attribute.