title: Setting the version number for .NET Core projects
body: <p>What are the options for setting a project version with .NET Core / ASP.NET Core projects? </p>
  
  <p>Found so far:</p>
  
  <ul>
  <li><p>Set the <code>version</code> property in <code>project.json</code>. Source: <a href="https://docs.asp.net/en/latest/dnx/projects.html">DNX Overview</a>, <a href="https://docs.asp.net/en/latest/dnx/overview.html">Working with DNX projects</a>. This seems to set the <code>AssemblyVersion</code>, <code>AssemblyFileVersion</code> and <code>AssemblyInformationalVersion</code> unless overridden by an attribute (see next point).</p></li>
  <li><p>Setting the <code>AssemblyVersion</code>, <code>AssemblyFileVersion</code>, <code>AssemblyInformationalVersion</code> attributes also seems to work and override the <code>version</code> property specified in <code>project.json</code>. </p>
  
  <p>For example, including <code>'version':'4.1.1-*'</code> in <code>project.json</code> and setting <code>[assembly:AssemblyFileVersion("4.3.5.0")]</code> in a <code>.cs</code> file will result in <code>AssemblyVersion=4.1.1.0</code>, <code>AssemblyInformationalVersion=4.1.1.0</code> and <code>AssemblyFileVersion=4.3.5.0</code></p></li>
  </ul>
  
  <p>Is setting the version number via attributes, e.g. <code>AssemblyFileVersion</code>, still supported?</p>
  
  <p>Have I missed something - are there other ways? </p>
  
  <h2>Context</h2>
  
  <p>The scenario I'm looking at is sharing a single version number between multiple related projects. Some of the projects are using .NET Core (project.json), others are using the full .NET Framework (.csproj). All are logically part of a single system and versioned together.</p>
  
  <p>The strategy we used up until now is having a <code>SharedAssemblyInfo.cs</code> file at the root of our solution with the <code>AssemblyVersion</code> and <code>AssemblyFileVersion</code> attributes. The projects include a link to the file. </p>
  
  <p>I'm looking for ways to achieve the same result with .NET Core projects, i.e. have a single file to modify.</p>