jmalarcon / DotNetVersions

Command line tool that shows the currently installed "classic" .NET versions in your system
https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed
MIT License
449 stars 96 forks source link

Missing one thing #2

Closed vintaclectic closed 4 years ago

vintaclectic commented 4 years ago

Runs great! Just would really like to request feature that adds file path to each version...thanks!

jmalarcon commented 4 years ago

Mmmm, that would be hard to do.

The folders are easily found because they are under C:\Windows\Microsoft.NET\. However there is one folder for .NET 32 bits (\Framework) and another for .NET 64 bits (\Framework64). Inside those there are folders for each "base" .NET framework version. For example, these are the ones in my computer:

image

There's not a direct relationship between versions and all the folders.

For example, if you run a .NET 3.5 app 32 bits and get the framework folder using System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory() you'll get the 2.0 v2.0.50727 folder, not the v3.5 folder, because, in fact, the base framework for 3.5 .NET is 2.0. And this would change the path if your app is running for 64 bits.

The same thing happens with .NET 4.x: the folder is v4.0.30319 in any case, but there are two possible paths depending on 32 or 64 bits.

So, to show that information in the console, at least I'll need to duplicate the information. And anyway it's extremely easy to find the folder for the .NET version you are interested in.

HTH

vintaclectic commented 4 years ago

Awesome, I never knew nor could find anything helpful in learning so...thank you very much for the detailed explanation, truly appreciate you!