如何找到系统中安装的.Net框架版本?
答案 0 :(得分:1)
使用Windows资源管理器,转到c:\ Windows \ Microsoft.NET \ Framework(或Framework64)。每个版本的.NET都会有一个文件夹。
答案 1 :(得分:0)
使用该代码构建一个小应用程序并将其提供给您的用户:
If Environment.Version.ToString <> "" Then
NetFramework = ".NET Framework " & Environment.Version.ToString
ElseIf Not IsNothing(Type.GetType("System.Runtime.GcLargeObjectHeapCompationMode", False)) Then
NetFramework = ".NET Framework 4.5.1"
ElseIf Not IsNothing(Type.GetType("System.Runtime.GcLargeObjectHeapCompationMode", False)) Then
NetFramework = ".NET Framework 4.5"
Else
Dim ass As Assembly = Assembly.GetExecutingAssembly()
Dim appVersion As String = ass.GetReferencedAssemblies.Where(Function(x) x.Name = "System.Core").First().Version.ToString
NetFramework = ".NET Framework " & appVersion
End If
msgbox(NetFramework)
end