Populate your AssemblyInfo

All too often, I download sample code with AssemblyInfo files that look like this:

So, basically, you're compiling into an assembly DLL or EXE with nothing but crappy, default metadata and versioning.


This is a companion discussion topic for the original blog entry at: http://www.codinghorror.com/blog/2004/11/populate-your-assemblyinfo.html

This also comes up all the time at work, too. Developers don’t seem to “get” AssemblyInfo, for whatever reason.

I think it’s more appropriate to leave it blank, specifically the company, e-mail address, and any other information which identifies the program’s purpose or identifies the author

Well, if your goal is to make the code more anonymous, then sure.

Because if some guy at NASA uses my code, I don’t want them calling me when the shuttle crashes. Leaving the old author’s name in especially if it’s a common name like “Greg Miller” will only cause confusion when the author can’t be found or is mistaken for someone else.

I dunno, I think of this as Fowler does:

http://www.artima.com/intv/principles4.html

Knowing who originally wrote the code is always helpful, and the appropriate place for that is in the assembly attributes. Weak ownership should be encouraged, but not abused (as you’re describing).

IMHO, I think it’s more appropriate to leave it bank, specifically the company, e-mail address, and any other information which identifies the program’s purpose or identifies the author. If you want that stuff in there, then you can put it in. But most of the code that can be downloaded isn’t intended to be dropped into a production application without any modification. And as soon as you make a modification to it all of the information becomes obsolete anyway so they’ve saved you the effort of actually deleting everything they would have typed anyway.

Even on the occasion that the code is intended to be used unmodified, whoever incorporates the code into their application should take responsibility for it. Because if some guy at NASA uses my code, I don’t want them calling me when the shuttle crashes. Leaving the old author’s name in especially if it’s a common name like “Greg Miller” will only cause confusion when the author can’t be found or is mistaken for someone else.

It’s the same in the ‘old style’ Win32 world with the version resource - either people don’t put one in or they have a default MFC AppWizard provided one and they never update it. It’s a very useful way of validating post-deployment configuration, either programmatically or by hand!!