12

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?

2
  • Do you mean AssemblyInfo.cs?
    – SLaks
    Jul 19, 2010 at 2:32
  • SLaks. Yes I meant AssemblyInfo.cs.
    – mpenrow
    Jul 19, 2010 at 2:34

2 Answers 2

21

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

0
5

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.