refactor(Admin.NET.Core): 预留 .NET 8.0 升级入口

- 在 ComputerUtil 类中的 PowerShell 方法中添加注释,标记为 .NET 8.0 可用
- 此修改为未来升级到 .NET 8.0 做准备,提醒开发者注意兼容性
This commit is contained in:
master 2024-10-26 10:15:59 +08:00
parent 2becb55751
commit a6f964a887

View File

@ -447,6 +447,7 @@ public class ShellUtil
/// <returns></returns>
public static string PowerShell(string script)
{
// net 8.0 可用
using var PowerShellInstance = System.Management.Automation.PowerShell.Create();
PowerShellInstance.AddScript(script);
var PSOutput = PowerShellInstance.Invoke();
@ -518,6 +519,7 @@ public class ShellHelper
/// <returns></returns>
public static string PowerShell(string script)
{
// net 8.0 可用
using var PowerShellInstance = System.Management.Automation.PowerShell.Create();
PowerShellInstance.AddScript(script);
var PSOutput = PowerShellInstance.Invoke();