win7 upgrade Powershell to 5.1 (for flutter)

foreword

Flutter is getting more and more popular. There was a major update of 1.9 a few days ago, and the problem came. The previous flutter version win7 was no problem, but

To install and run Flutter, your development environment should at least meet the following requirements:

Operating system: Windows 7 SP1 or higher (64-bit operating system).

磁盘空间:除安装 IDE 和一些工具之外还应有至少 400 MB 的空间。

工具:要让 Flutter 在你的开发环境中正常使用,依赖于以下的工具:

    Windows PowerShell 5.0 或者更高的版本(Windows 10 中已经预装了)

    Git for Windows 2.x,并且勾选从 Windows 命令提示符使用 Git 选项。

    如果 Windows 版的 Git 已经安装过了,那么请确保能从命令提示符或者 PowerShell 中直接执行 git 命令。
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

Yes, Windows7 sp1 has built-in Powershell v2.0, no way, upgrade it!

Well, because Powershell is built into Windows Manager Framework, the default v 3.5 version in win7, the corresponding Powershell can only be upgraded to v 4.0, so you need to upgrade .NET Framework first.

Check the relevant information first:

  • Control Panel->>All Control Panel Items->>System, check the computer version number, mine is Windows7 sp1.
  • Windows + R, enter powershell, press Enter, open the command line window, enter $PSVersionTable, you can view the version number of powershell. This will be used later.
  • Open the address bar and enter C:\Windows\Microsoft.NET\Framework to view the version of .NET Framework. The highest version is the version installed on the computer, and the larger version is displayed under the general path.

There are also resources that need to be downloaded:

Note: Make sure you have installed .net 4.5+, which is required for Powershell v5.1. If it is not installed, install .net 4.6 directly, there is a download link above.

Ok, ready to go.

1. Check the powershell version number, which is currently v2.0, and the goal is to upgrade to v5.1

There are two options:

  1. Upgrade Powershell2.0 to Powershell4.0, then install the .NET plug-in v4.6, and finally install Powershell v5.1.
  2. Install the .NET plugin v4.6 directly, and finally install Powershell v5.1.

This is the download address of Powershell v4.0: https://www.microsoft.com/zh-CN/download/details.aspx?id=40855
insert image description here
Install it directly, restart the system after the installation is complete, and test it.

2. Install .NET plugin v4.6, Powershell v5.1

Install the .NET plug-in first, and then install Powershell. They are all downloaded and installed directly. It is very simple. If there is a problem, check to see if there is a problem with the download.

Then remember to restart the system, test and check the Powershell version, like this:
insert image description here

Problem solved~ (Continue to flutter)

Guess you like

Origin blog.csdn.net/qiuziqiqi/article/details/114023527