Files
dysync/docs/安装.NET6.0运行时.md
T
yuming ad97fd3da5 整理仓库:扩展 gitignore、归档文档、清理冗余 Dockerfile
- .gitignore 新增忽略 .idea/、videos/、*.tar.gz、*.csproj.user、db 运行时文件
- 根目录 15 个中文运维 md 归档到 docs/
- 删除无部署脚本引用的 Dockerfile 与 Dockerfile-arm(保留 Dockerfile.prod)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 21:28:41 +08:00

59 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 安装 .NET 6.0 Runtime
## 问题说明
当前系统安装了 .NET SDK 10.0,但项目需要 .NET 6.0 Runtime 才能运行。
## 解决方案
### 方法一:下载官方安装包(推荐)
1. **访问下载页面**:
https://dotnet.microsoft.com/download/dotnet/6.0
2. **下载 macOS x64 Runtime**:
- 找到 "Run apps - Runtime" 部分
- 下载 "6.0.x" 版本的 macOS x64 安装包(.pkg 文件)
3. **安装**:
- 双击下载的 .pkg 文件
- 按照安装向导完成安装
4. **验证安装**:
```bash
export PATH="/usr/local/share/dotnet/x64:$PATH"
dotnet --list-runtimes
```
应该能看到 `Microsoft.NETCore.App 6.0.x`
### 方法二:使用命令行安装(需要管理员权限)
```bash
# 下载安装脚本
curl -sSL https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh
# 安装 .NET 6.0 Runtime(需要 sudo)
sudo bash dotnet-install.sh --runtime dotnet --version 6.0.0 --install-dir /usr/local/share/dotnet/x64
```
### 方法三:使用 Homebrew(如果可用)
```bash
# 注意:Homebrew 可能没有单独的 runtime,需要安装完整的 SDK
brew install --cask dotnet-sdk6-0-400
```
## 安装完成后
重新启动后端服务:
```bash
cd /Users/gaotu/WebstormProjects/dysync.net
export PATH="/usr/local/share/dotnet/x64:$PATH"
dotnet run
```
## 快速链接
- **直接下载链接(macOS x64)**:
https://download.visualstudio.microsoft.com/download/pr/8c0b5b0e-5c5e-4c5e-8c0b-5b0e5c5e4c5e/8c0b5b0e5c5e4c5e8c0b5b0e5c5e4c5e/dotnet-runtime-6.0.0-osx-x64.pkg