title: How do I make automatic version numbers work in Visual Studio
body: <p>I've been asked to add automatic numbering to assemblies in our code library. I've been changing versions from the default 1.0.0.0 to 1.0.* like this:</p>
  
  <p>[assembly: AssemblyVersion("1.0.*")]</p>
  
  <p>It generates a number as I'd like.</p>
  
  <p>However, the code library has many hundreds of DLLs, with many referencing each other. Now when I compile some projects they complain that the version of a DLL needed by a referenced component is not correct and they won't build :(</p>
  
  <p>How can I make this work? We need it so that when a DLL at the bottom of our code library hierarchy is compiled, all other DLLs that reference it work correctly without needing recompiling.</p>
  
  <p>The error I get is like this:</p>
  
  <pre><code>Error   1   CA0058 : The referenced assembly 'Library1, Version=1.0.4146.17993
  , Culture=neutral, PublicKeyToken=d9c65edd2096ad48' could not be found. This assembly
  is required for analysis and was referenced by:
  D:\Work\Source Code\Library\Library2\bin\Release\Library2.dll.
  </code></pre>
  
  <p>The version 1.0.4146.17993 is not correct - the DLL has a higher value. The DLLs are set to Copy Local because the software we deliver requires it (don't ask why). The DLL that's copied locally is the one with the higher version number, which is the one we want it to be.</p>
  
  <p>So far I've tried changing the references to set the "Specific Version" flag to false but this didn't help. </p>