This article will help you to know which .NET Framework version is installed from command line.
dir %WINDIR%\Microsoft.Net\Framework\v*
dir %WINDIR%\Microsoft.Net\Framework\v* /O:-N /B
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework
class CDotNetVersion { public List<string> versionList { get; set; } public CDotNetVersion() { versionList = new List<string>(); } public void GetVersion() { versionList = new List<string>(); using (var ndpKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\NET Framework Setup\NDP")) { Action<RegistryKey, Action<RegistryKey, string>> processKids = (node, action) => { foreach (var childname in node.GetSubKeyNames()) using (var child = node.OpenSubKey(childname)) action(child, childname); }; Action<RegistryKey, Func<RegistryKey, bool>> visitDescendants = null; visitDescendants = (regkey, isDone) => { if (!isDone(regkey)) processKids(regkey, (subkey, subkeyname) => visitDescendants(subkey, isDone)); }; processKids(ndpKey, (versionKey, versionKeyName) => { if (Regex.IsMatch(versionKeyName, @"^v\d")) { visitDescendants(versionKey, key => { bool isInstallationNode = Equals(key.GetValue("Install"), 1) && key.GetValue("Version") != null; if (isInstallationNode) versionList.Add( key.Name.Substring(ndpKey.Name.Length + 1) + (key.GetValue("SP") != null ? ", service pack " + key.GetValue("SP") : "") + " (" + key.GetValue("Version") + ") " ); return isInstallationNode; }); } }); } } }
.Net Framework Version: v2.0.50727, service pack 2 (2.0.50727.5420) .Net Framework Version: v3.0, service pack 2 (3.0.30729.5420) .Net Framework Version: v3.5, service pack 1 (3.5.30729.5420) .Net Framework Version: v4\Client (4.5.50709) .Net Framework Version: v4\Full (4.5.50709) .Net Framework Version: v4.0\Client (4.0.0.0)
General News Suggestion Question Bug Answer Joke Praise Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.