-
下载源代码
git clone --recursive https://github.com/dotnet/aspnetcore.git
-
查看版本标签
git tag
-
切换到指定版本
git checkout v3.1.2
-
visual studio更新,这里使用powershell,以管理员身份运行
.\eng\scripts .\InstallVisualStudio.ps1 -edition enterprise
如果出现错误,则运行下面命令:
Set-ExecutionPolicy RemoteSigned
-
项目依赖还原,这里使用cmd窗口,powershell不行
aspnetcore根目录下有restore.cmd,执行restore命令
-
运行build命令,这里使用cmd窗口,powershell不行
-
visual studio 打开 Mvc解决方案
src\Mvc Mvc.sln startvs Mvc.sln的路径
参考:https://www.cnblogs.com/calvinK/p/6711848.html
https://www.cnblogs.com/ZaraNet/archive/2019/12/07/12001261.html