views:

164

answers:

2

I was watching a video on Git and the guy went out of his way to ignore the AssemblyInfo.cs. Why should I not check that file in? If I don't check the file in won't Visual Studio complain for the next user when he checks my code out?

+13  A: 

Some people generate AssemblyInfo.cs from a script when building. That way the date and version numbers can be changed automatically.

Charlie Salts
@Changeling: Thanks for the edit! I can't believe I missed that.
Charlie Salts
+1  A: 

The main downside I can think of is that AssemblyInfo.cs is the source for the various version numbers of the built assemblies.

This doesn't mean that your AssemblyInfo.cs files should not be in source control (they absolutely should in my opinion) but that developers should be very careful about checking them in.

Where I work we have an automated build process that manages the version numbers so only that process modifies the AssemblyInfo.cs files - developers modify a seperate VersionNumber file when they schedule a minor or major build that requires a signifigant version number change.

David Hall