Skip to content

Commit b1e468f

Browse files
committed
Update minimum supported .NET check to 4.8
This is not updating our requirement, that apparently already changed to 4.8 as determined by testing.
1 parent 708759b commit b1e468f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/PowerShellEditorServices.Hosting/EditorServicesLoader.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public sealed class EditorServicesLoader : IDisposable
3333
{
3434
#if !CoreCLR
3535
// See https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed
36-
private const int Net462Version = 394802;
36+
private const int Net48Version = 528040;
3737

3838
private static readonly string s_psesBaseDirPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
3939
#endif
@@ -244,7 +244,7 @@ private static void LoadEditorServices() =>
244244
#if !CoreCLR
245245
private void CheckNetFxVersion()
246246
{
247-
_logger.Log(PsesLogLevel.Diagnostic, "Checking that .NET Framework version is at least 4.6.2");
247+
_logger.Log(PsesLogLevel.Diagnostic, "Checking that .NET Framework version is at least 4.8");
248248
using RegistryKey key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full");
249249
object netFxValue = key?.GetValue("Release");
250250
if (netFxValue == null || netFxValue is not int netFxVersion)
@@ -254,9 +254,9 @@ private void CheckNetFxVersion()
254254

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

257-
if (netFxVersion < Net462Version)
257+
if (netFxVersion < Net48Version)
258258
{
259-
_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.");
259+
_logger.Log(PsesLogLevel.Warning, $".NET Framework version {netFxVersion} lower than .NET 4.8. This runtime is not supported and you may experience errors. Please update your .NET runtime version.");
260260
}
261261
}
262262
#endif

0 commit comments

Comments
 (0)