天天看点

asp.net core源代码下载与运行

  1. 下载源代码

    git clone --recursive https://github.com/dotnet/aspnetcore.git

  2. 查看版本标签

    git tag

  3. 切换到指定版本

    git checkout v3.1.2

  4. visual studio更新,这里使用powershell,以管理员身份运行

    .\eng\scripts .\InstallVisualStudio.ps1 -edition enterprise

    如果出现错误,则运行下面命令:

    Set-ExecutionPolicy RemoteSigned

  5. 项目依赖还原,这里使用cmd窗口,powershell不行

    aspnetcore根目录下有restore.cmd,执行restore命令

    asp.net core源代码下载与运行
  6. 运行build命令,这里使用cmd窗口,powershell不行
  7. 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

继续阅读