Skip to content

Commit 5a28337

Browse files
authored
Fix error when started in low .NET versions (#1363)
1 parent 376243d commit 5a28337

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PowerShellEditorServices.Hosting/EditorServicesLoader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ private static object GetPSVersion()
398398
return typeof(PSObject).Assembly
399399
.GetType("System.Management.Automation.PSVersionInfo")
400400
.GetMethod("get_PSVersion", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic)
401-
.Invoke(null, Array.Empty<object>());
401+
.Invoke(null, new object[0] /* Cannot use Array.Empty, since it must work in net452 */);
402402
}
403403
}
404404
}

0 commit comments

Comments
 (0)