介绍
.net 5.0 官方没有 macos 的arm包,但是得益于苹果的转译中间层,新款的m系列芯片的macbook依然可以搭建好 .net5.0环境。
前期工作
- 由于安装 Visual Studio 2022 for mac 会自动安装 arm版本 .net6.0 运行时和sdk,在后续安装 .net5.0 时会冲突。所以开始之前请卸载 vs2022 for mac
- 卸载之后使用以下shell 脚本卸载 .net6.0 框架
#!/usr/bin/env bash
#
# Copyright (c) .NET Foundation and contributors. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
#
DIR="$( cd "$(