Check .NET versions installed
There are several ways to find out which versions of .NET are installed on your system or on a server. Below are a few Powershell commands Ive been using.
<#
Version Minimum value of the Release DWORD
.NET Framework 4.5 378389
.NET Framework 4.5.1 378675
.NET Framework 4.5.2 379893
.NET Framework 4.6 93295
.NET Framework 4.6.1 394254
.NET Framework 4.6.2 394802
.NET Framework 4.7 460798
.NET Framework 4.7.1 461308
#>
#-- Find out if specific version of.NET Framework installed
Get-ChildItem "HKLM:SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\" | Get-ItemPropertyValue -Name Release | ForEach-Object { $_ -ge 378389 }
# -- Check for .NET Core 2.0
$software = "Microsoft .NET Core Runtime - 2.0.0 (x64)";
$installed = (Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Where { $_.DisplayName -eq $software }) -ne $null
If(-Not $installed) {
Write-Host "'$software' NOT is installed.";
} else {
Write-Host "'$software' is installed."
}
Subscribe to:
Post Comments (Atom)
Add appsettings.json to .NET 6 Console App
When you start a new .NET 6 Console app, you will have little more than what you see here. If one wants to use the json configuration fi...
-
If you only ever deal with one target machine for your app, life is simple. In the "real world" you often have to deal with multi...
-
When I first started looking at Angular it was still called AngularJS. Then came Angular2 and Typescript. At the same time, Microsoft was ...
-
Having used Entity Framework since 4.x, I have seen plenty of examples of what works and what doesn't regarding this library. One of ...
No comments:
Post a Comment