How can I find the version of .NET run-time programmatically? : <p>I need a solution to give me the <em>.NET</em> run-time version of both the full framework as well as the <em>.NET Core</em>.</p>

<p>On a machine with the following <em>.NET</em> versions:</p>

<pre><code>Full: 4.7.2
Core: 2.1.104
</code></pre>

<p>Running:</p>

<pre><code>RuntimeInformation.FrameworkDescription
</code></pre>

<p>Gives me:</p>

<pre><code>Full: .NET Framework 4.7.2558.0
Core: .NET Core 4.6.26212.01
</code></pre>

<p>Running:</p>

<pre><code>Environment.Version
</code></pre>

<p>Gives me: </p>

<pre><code>Full: 4.0.30319.42000
Core: 4.0.30319.42000
</code></pre>

<p>How can I accurately get the run-time versions across different platforms knowing that the registry option is not available outside <em>Windows</em>.</p>
