Skip to content

Commit 83020fc

Browse files
Fix missed .NET 4.6.2 code (#1768)
1 parent 8166a1c commit 83020fc

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

module/PowerShellEditorServices/PowerShellEditorServices.psd1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ PowerShellVersion = '5.1'
4949

5050
# Minimum version of Microsoft .NET Framework required by this module
5151
# NOTE: We check this later, so that the error message is communicated properly to the user
52-
# DotNetFrameworkVersion = '4.6.1'
52+
# DotNetFrameworkVersion = '4.6.2'
5353

5454
# Minimum version of the common language runtime (CLR) required by this module
5555
# CLRVersion = ''
@@ -129,4 +129,3 @@ PrivateData = @{
129129
# DefaultCommandPrefix = ''
130130

131131
}
132-

src/PowerShellEditorServices.Hosting/EditorServicesLoader.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ namespace Microsoft.PowerShell.EditorServices.Hosting
3232
public sealed class EditorServicesLoader : IDisposable
3333
{
3434
#if !CoreCLR
35-
private const int Net461Version = 394254;
35+
// See https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed
36+
private const int Net462Version = 394802;
3637

3738
private static readonly string s_psesBaseDirPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
3839
#endif
@@ -242,7 +243,7 @@ private static void LoadEditorServices() =>
242243
#if !CoreCLR
243244
private void CheckNetFxVersion()
244245
{
245-
_logger.Log(PsesLogLevel.Diagnostic, "Checking that .NET Framework version is at least 4.6.1");
246+
_logger.Log(PsesLogLevel.Diagnostic, "Checking that .NET Framework version is at least 4.6.2");
246247
using RegistryKey key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full");
247248
object netFxValue = key?.GetValue("Release");
248249
if (netFxValue == null || netFxValue is not int netFxVersion)
@@ -252,9 +253,9 @@ private void CheckNetFxVersion()
252253

253254
_logger.Log(PsesLogLevel.Verbose, $".NET registry version: {netFxVersion}");
254255

255-
if (netFxVersion < Net461Version)
256+
if (netFxVersion < Net462Version)
256257
{
257-
_logger.Log(PsesLogLevel.Warning, $".NET Framework version {netFxVersion} lower than .NET 4.6.1. This runtime is not supported and you may experience errors. Please update your .NET runtime version.");
258+
_logger.Log(PsesLogLevel.Warning, $".NET Framework version {netFxVersion} lower than .NET 4.6.2. This runtime is not supported and you may experience errors. Please update your .NET runtime version.");
258259
}
259260
}
260261
#endif

0 commit comments

Comments
 (0)