Home All Groups Group Topic Archive Search About

.NET assembly, version information and VS 6/7 .res

Author
2 Feb 2007 2:57 AM
russiandevil
hi all,

For the versioning purposes, my previous application versions (Visual
Studio 6, Visual Studio 7.1) were using a versioninfo.res file, that
was compiled at the start of the build process (using a header file
with a dynamically-generated #define for subversion revision number),
and then linked in with any binaries produced in the remainder of the
build.

My intention is to have a similar sort of dynamic build/version
information for the binaries resulting from my Visual Studio 2005
projects. I've started by commenting out the

[assembly: AssemblyFileVersion("...")]

line in AssemblyInfo.cs (under Project -> Properties), and then
attempted to add the versioninfo.res (that was mentioned earlier) to
the project Resources. However the resulting binary has the file
version matching the assembly version, which to me indicates that the
added versioninfo.res had no effect whatsoever.

If I create a simple helloworld.cs, and then use csc /
win32res:versioninfo.res helloworld.cs, the resulting executable does
have the file version that I'm after.

So, I was wondering exactly what changes do I need to make using the
IDE to ensure that the file version information from my pre-
compiled .res file makes its way into the .NET application's
versioning information.

thanks in advance,

regards,
Greg

AddThis Social Bookmark Button