- 下載下傳源代碼
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