vfox
vfox copied to clipboard
Add-Content : 找不到接受实际参数“Invoke-Expression”的位置形式参数
<-- Please answer these questions before submitting them. Thank you. -->
Version vfox version 0.6.10 OS Windows 版本 Windows 11 专业工作站版 版本号 24H2 安装日期 2025/5/12 操作系统版本 26100.3775 体验 Windows 功能体验包 1000.26100.66.0
Question Description 使用vfox_0.6.10_windows_setup_x86_64.exe安装 安照官方文档 创建 PowerShell 配置:
if (-not (Test-Path -Path $PROFILE)) { New-Item -Type File -Path $PROFILE -Force }; Add-Content -Path $PROFILE -Value 'Invoke-Expression "$(vfox activate pwsh)"'Invoke-Expression "$(vfox activate pwsh)"
再打开PowerShell 提示上述错误,重启电脑依然报错
环境变量已经自动配置好
- You are not using PowerShell, you are using Windows PowerShell.
- Windows PowerShell has stopped adding new features and is designed primarily for internal use. You should download and use PowerShell 7.
- 您没有使用 PowerShell,您正在使用 Windows PowerShell。
- Windows PowerShell 已停止添加新功能,主要供内部使用。您应该下载并使用 PowerShell 7。
谢谢 我安装了最新的PowerShell-7.5.1并将它设置为默认后错误消失了