我如何知道安装了哪个版本的。net ?
我正在寻找一些像java -version一样简单的东西,我可以在命令提示符中键入,并告诉我当前安装的版本。
我最好补充一点,Visual Studio可能不会被安装——这通常是我想知道的关于客户端机器的事情。
我如何知道安装了哪个版本的。net ?
我正在寻找一些像java -version一样简单的东西,我可以在命令提示符中键入,并告诉我当前安装的版本。
我最好补充一点,Visual Studio可能不会被安装——这通常是我想知道的关于客户端机器的事情。
当前回答
我的天,找到安装的。net框架的版本有这么多麻烦?
Windows >搜索> Visual Studio Installer >为已安装的VS版本,点击更多>修改>单个组件,并在那里看到它:
其他回答
适用于运行Windows 10 1607并寻找。net 4.7的用户。 忽略以上所有。
不在注册表中,c:\ windows \微软NET文件夹或“已安装程序”列表或同一列表的WMIC显示。
查找“已安装的更新”KB3186568。
对于所安装的框架版本,它取决于您安装的服务包和修复程序。更多细节请查看MSDN页面。建议在%systemroot%\Microsoft中查找。NET\Framework获取版本。
环境。Version将以编程方式为您提供CLR的版本。
请注意,这是CLR的版本,不一定与您安装的框架的最新版本相同(。NET 3.0和3.5都使用CLR的v2版本)。
MSDN详细介绍了如何从注册表中检查它:
To find .NET Framework versions by viewing the registry (.NET Framework 1-4) On the Start menu, choose Run. In the Open box, enter regedit.exe.You must have administrative credentials to run regedit.exe. In the Registry Editor, open the following subkey: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP The installed versions are listed under the NDP subkey. The version number is stored in the Version entry. For the .NET Framework 4 the Version entry is under the Client or Full subkey (under NDP), or under both subkeys. To find .NET Framework versions by viewing the registry (.NET Framework 4.5 and later) On the Start menu, choose Run. In the Open box, enter regedit.exe. You must have administrative credentials to run regedit.exe. In the Registry Editor, open the following subkey: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full Note that the path to the Full subkey includes the subkey Net Framework rather than .NET Framework Check for a DWORD value named Release. The existence of the Release DWORD indicates that the .NET Framework 4.5 or newer has been installed on that computer.
注意:上面快照中被剪切的最后一行在所有其他操作系统版本上为:461310。我尽我最大的努力避免在截屏时信息被剪切,但表格太大了。
在进入命令提示符之前,请遵循以下步骤…
进入“C:/Windows/Microsoft. exe”目录。→在这个文件夹中,会有(all或any)这样的文件夹:
v1.0.3705 v2.0.50727 v3.5 v4.0.30319
你最新的。net版本应该在v号最高的文件夹中,所以如果“v4.0.30319”可用,就可以存放你最新的。net框架。但是,“v4.0.30319”并不意味着。net框架版本为4.0。“v4.0.30319”是您的Visual c#编译器版本,因此,为了找到. net框架版本,请执行以下操作。
进入命令提示符并按照以下路径执行:
C:\Windows\Microsoft.NET\Framework\v4.0.30319(或任何v值最高的文件夹)
C:\Windows\Microsoft.NET\框架\v4.0 30319 > csc.exe
输出:
微软(R) Visual c#编译器版本4.0.30319.17929 用于Microsoft (R) .NET Framework 4.5 微软公司版权所有。版权所有。
在下面的例子:
如果打开命令提示符并键入以下两个命令,将列出当前机器上安装的所有框架版本(每个版本都存储在该目录中的单独目录中)。
cd %systemroot%\Microsoft.NET\Framework
dir /A:D