title: .NET Core assemby auto-versioning works in assemblyInfo.cs but not in project file
body: <p>I have read several posts about versioning assemblies in .NET Core. I have .NET Framework assemblies that use the auto-versioning where, in assemblyInfo.cs, I set the [assembly: AssemblyVersion("2.1.*")] attribute. When I build the assembly I can check it's properties and the file and product versions both reflect a version like 2.1.6985.26662, where 6985 and 26662 are the automatically populated build and revision numbers. </p>
  
  <p>I understand that in .NET Core I can set the assembly info in the project file, so I started with the following in my project file: </p>
  
  <pre><code>  &lt;PropertyGroup&gt;
      &lt;TargetFramework&gt;netcoreapp2.2&lt;/TargetFramework&gt;
      &lt;AspNetCoreHostingModel&gt;InProcess&lt;/AspNetCoreHostingModel&gt;
      &lt;DockerDefaultTargetOS&gt;Windows&lt;/DockerDefaultTargetOS&gt;
      &lt;UserSecretsId&gt;7c702802-48ca-46ea-8a7a-1fa89100baef&lt;/UserSecretsId&gt;
      &lt;Deterministic&gt;false&lt;/Deterministic&gt;
      &lt;AssemblyVersion&gt;2.1.*&lt;/AssemblyVersion&gt;
    &lt;/PropertyGroup&gt;
  </code></pre>
  
  <p>The Deterministic=false is necessary in order for the version to contain a wildcard. Elsewhere in my code I access and expose the version, accessing it with </p>
  
  <pre><code>            Version serviceVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
              DateTime buildDate = new DateTime(2000, 1, 1).AddDays(serviceVersion.Build).AddSeconds(serviceVersion.Revision * 2);
              string reportVersion = "{serviceVersion} ({buildDate})";
  </code></pre>
  
  <p>When I run that code, the build and revision are always 0. .NET Core accepts the wildcard in the version, but doesn't appear to automatically populate the build and revision numbers. </p>
  
  <p>If I remove the assembly version from the project file and put it in an assemblyInfo.cs file instead, it seems to work as I expect it to. So I end up with this in my project file: </p>
  
  <pre><code>  &lt;PropertyGroup&gt;
      &lt;TargetFramework&gt;netcoreapp2.2&lt;/TargetFramework&gt;
      &lt;AspNetCoreHostingModel&gt;InProcess&lt;/AspNetCoreHostingModel&gt;
      &lt;DockerDefaultTargetOS&gt;Windows&lt;/DockerDefaultTargetOS&gt;
      &lt;UserSecretsId&gt;7c702802-48ca-46ea-8a7a-1fa89100baef&lt;/UserSecretsId&gt;
      &lt;Deterministic&gt;false&lt;/Deterministic&gt;
      &lt;GenerateAssemblyInfo&gt;false&lt;/GenerateAssemblyInfo&gt;
    &lt;/PropertyGroup&gt;
  </code></pre>
  
  <p>The GenerateAssemblyInfo = false is necessary so that automatically generated assembly attributes don't conflict with my explicitly set attributes. And I've got this in my assemblyInfo.cs file: </p>
  
  <pre><code>[assembly: AssemblyVersion("2.1.*")]
  </code></pre>
  
  <p>The reflection code I use to read and access the version is the same, but it now has the expected build and revision numbers. </p>
  
  <p>Does anyone know if the automatically set build and revision numbers are <em>supposed</em> to work when the assembly version is set with a wildcard in the project file? Or I am doing something wrong that causes that not to work? </p>