<p>In .NET there are two version numbers available when building a project, File Version and Assembly Version. How are you using these numbers?  Keeping them the same?  Auto-incrementing one, but manually changing the other?</p>

<p>Also what about the <code>AssemblyInformationalVersion</code> attribute?</p>

<p>I'd found this support Microsoft Knowledge Base (KB) article that provided some help:  <a href="http://support.microsoft.com/kb/556041" rel="noreferrer">How to use Assembly Version and Assembly File Version</a>.</p>

[{'answer_id': 14776, 'author': 'TheSmurf', 'author_id': 1975282, 'author_profile': 'https://Stackoverflow.com/users/1975282', 'pm_score': 0, 'selected': False, 'text': "<p>I keep them the same. But then, I don't have multifile assemblies, which is when the AssemblyVersion number becomes important. I use Microsoft-style date encoding for my build numbers, rather than auto-incrementing (I don't find the number of times that something has been built to be all that important).</p>\n"}, {'answer_id': 14787, 'author': 'Adam Haile', 'author_id': 194, 'author_profile': 'https://Stackoverflow.com/users/194', 'pm_score': 5, 'selected': True, 'text': '<p>In a scenario where I have multiple file assemblies (i.e. 1 exe and 5 dlls) I will use a different file version for each, but the same assembly version for all of them, allowing you to know which exe each of the dlls go with.</p>\n'}, {'answer_id': 14826, 'author': 'Rick', 'author_id': 1752, 'author_profile': 'https://Stackoverflow.com/users/1752', 'pm_score': 2, 'selected': False, 'text': '<p>@Adam: Are you changing the file version with each build?  Are you using version control (SYN or VSS) and using that information to link source back to the binaries?</p>\n\n<p>Seems to make sense that the Assembly version stays the same. i.e. "2.0.0.0".  That corresponds to the deployment of the product.</p>\n\n<p>The file version changes to match the revision from the source control.  "2.0.??.revision"  This would provide a link from a specific dll (or exe) to the source that built it.</p>\n'}, {'answer_id': 14835, 'author': 'Jon Dewees', 'author_id': 1365, 'author_profile': 'https://Stackoverflow.com/users/1365', 'pm_score': 6, 'selected': False, 'text': '<p>In solutions with multiple projects, one thing I\'ve found very helpful is to have all the AssemblyInfo files point to a single project that governs the versioning. So my AssemblyInfos have a line:</p>\n\n<pre><code>[assembly: AssemblyVersion(Foo.StaticVersion.Bar)]\n</code></pre>\n\n<p>I have a project with a single file that declares the string:</p>\n\n<pre><code>namespace Foo\n{\n    public static class StaticVersion\n    {\n         public const string Bar= "3.0.216.0"; // 08/01/2008 17:28:35\n    }\n}\n</code></pre>\n\n<p>My automated build process then just changes that string by pulling the most recent version from the database and incrementing the second last number.</p>\n\n<p>I only change the Major build number when the featureset changes dramatically.</p>\n\n<p>I don\'t change the file version at all.</p>\n'}, {'answer_id': 14956, 'author': 'voyce', 'author_id': 1719, 'author_profile': 'https://Stackoverflow.com/users/1719', 'pm_score': 5, 'selected': False, 'text': '<p>The KB article mentions the most important distinction: File versions are only used for display purposes, whereas the assembly version plays an important part in the .NET loading behaviour.</p>\n\n<p>If you change the assembly version number, then the identity of your assembly as a whole has changed. Developers will need to rebuild to reference your new version (unless you put some auto-versioning "policy" in place) and at runtime only assemblies with matching version numbers will be loaded.</p>\n\n<p>This is important in my environment, where we need an incrementing, highly visible version number for audit purposes, but we don\'t want to force developers to rebuild or have many versions concurrently in production. In this case for backwardly-compatible minor changes we update the file version, but not the assembly version.</p>\n'}, {'answer_id': 1723609, 'author': 'Mark Sowul', 'author_id': 155892, 'author_profile': 'https://Stackoverflow.com/users/155892', 'pm_score': 4, 'selected': False, 'text': '<blockquote>\n  <p>File versions are only used for display purposes, whereas the assembly version plays an important part in the .NET loading behaviour.</p>\n</blockquote>\n\n<p>Not quite.  The file version is also important for Windows Installer when you upgrade an existing version over a previous one.  </p>\n'}, {'answer_id': 1723652, 'author': 'Philip Wallace', 'author_id': 190145, 'author_profile': 'https://Stackoverflow.com/users/190145', 'pm_score': 4, 'selected': False, 'text': '<p>With my current application, each VS project has a link to an "AssemblyBuildInfo" source file which has the following attributes:</p>\n\n<pre><code>[assembly: AssemblyVersion("1.0.*")]\n[assembly: AssemblyCompany("Acme Corporationy")]\n[assembly: AssemblyCopyright("Copyright ©  2009 Acme Corporation")]\n</code></pre>\n\n<p>This way, all the assemblies in my solution share same version and company information (meaning if I have to change it, I change it only one time).  By excluding the FileVersion, it is automatically set to the AssemblyVersion.</p>\n'}]
['https://Stackoverflow.com/questions/14770', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1752/']