[p4] Adding Changelist # of project to .Net Assembly?
Pavloff, Alex (IE) @ SONOMAEO
alex.pavloff at l-3com.com
Thu Oct 19 18:03:52 PDT 2006
Hi perforce-user,
For our C/C++ project We've added a "p4 changes -m1 $...@$(P4CLIENT)"
step to our makefiles -- and taken the output from that and generated a
.c file from this. This file contains the highest changelist # at the
time of build of the source in the directory.
As long as this was built from checked-in source, it can be used by
testers and what not as a "what I'm testing" #. If you need to rebuild
that particular rev, sync to the changelist #, rebuild, wa-lah.
Now, I'm thinking about trying to do the same thing with a Visual Studio
2005/C# project -- and I believe that the "correct" way to do this would
be to generate generate the AssemblyVersion attribute from the Perforce
changelist #, such that it'd be
[assembly: AssemblyVersion("1.0.0.98776")]
Where 98776 is the Changelist #. Normally this attribute is hardcoded
in the AssemblyInfo.cs file.
Does anyone have any ideas about how to generate this in the Pre-Build
steps for C#/.Net applications?
Thanks!
-Alex
More information about the perforce-user
mailing list