Reputation: 2193
I'm trying to develop a piece of Code (C++ or C#) through which I should be able to inject File/Product version, company and copyright information into our binaries (.net and C++ based) before packing these into the installer.
Any help would be really appreciated?
Thanks
Upvotes: 1
Views: 621
Reputation: 12654
For managed code you can use assembly attributes. Their values will be shown in file details, if you open it in explorer, and they also can be accessed from code.
[assembly: AssemblyVersion("2.7.35.0")]
[assembly: AssemblyConfiguration("QA")]
[assembly: AssemblyDescription("It's my app")]
Visual studio generates AssemblyInfo.cs file with these attributes for each project, so you can just update it.
Upvotes: 1