title: Programmatically get the version number of dotnet core library dll
body: <p>How to get the version number programmatically from any .NET Core library DLL?<br />
  For e.g: &quot;api-ms-win-core-console-l1-1-0.dll&quot;</p>
  <p>The same question is asked <a href="https://stackoverflow.com/questions/1755504/programmatically-get-the-version-number-of-a-dll">here</a> but it is not working for core libraries listed below:</p>
  <ul>
  <li>api-ms-win-core-console-l1-1-0.dll</li>
  <li>api-ms-win-core-datetime-l1-1-0.dll</li>
  <li>api-ms-win-core-debug-l1-1-0.dll</li>
  </ul>
  <p>sample code</p>
  <pre><code>string file = @&quot;C:\dotnet_core_lib\api-ms-win-core-console-l1-1-0.dll&quot;;
  string  version = System.Reflection.AssemblyName.GetAssemblyName(file).Version.ToString();
  </code></pre>
  <p>I am getting following error message:<br />
  <strong>Error Message</strong>: &quot;Could not load file or assembly 'api-ms-win-core-console-l1-1-0.dll' or one of its dependencies. The module was expected to contain an assembly manifest.&quot;</p>