# 使用 Homebrew, chocolatey 安装 dotnet

查看 dotnet 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:dotnet
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install dotnet
```

  证据: local Homebrew formula metadata

### Windows

- Chocolatey (92%):

```sh
choco install dotnet
```

  证据: Chocolatey community package catalog: dotnet from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','dispcalgui.install'

## 软件包事实

- **软件包键:** brew:dotnet
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/dotnet>
- **版本:** 10.0.302
- **来源摘要:** .NET Core
- **主页:** <https://dotnet.microsoft.com/>
- **仓库:** <https://github.com/dotnet/dotnet>
- **上游文档:** <https://dotnet.microsoft.com/>
- **许可证:** MIT
- **源码归档:** <https://github.com/dotnet/dotnet/releases/download/v10.0.302/release.json>
- **最后更新:** 2026-07-16T05:27:50Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- dotnet (cli)
- dotnet (别名)

## 依赖

- brotli
- icu4c@78
- openssl@3

## 构建依赖

- bash
- cmake
- grep
- pkgconf
- rapidjson

## macOS 提供的库

- krb5

## 安装行为

- post-install 钩子: 未定义
- 注意事项: For other software to find dotnet you may need to set: export DOTNET_ROOT="$HOMEBREW_PREFIX/opt/dotnet/libexec"
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 10.0.302
- 管理器更新时间: 2026-07-16
- 本地数据: OK
- 上游仓库: https://github.com/dotnet/dotnet
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

.NET is Microsoft's managed runtime, SDK, class-library, and command-line toolchain for building applications in C#, F#, and related languages. The Homebrew formula centers on the `dotnet` host and SDK/runtime distribution used from terminals, CI systems, containers, and editors.

### 项目历史

Modern .NET package history turns on the .NET Core shift. Microsoft announced in November 2014 that .NET Core, including the runtime and framework libraries, would be open source. .NET Core 1.0 shipped in June 2016 as a cross-platform line, and the release train later converged under the plain .NET name with .NET 5 in November 2020.

The current .NET ecosystem is organized around annual November major releases, split between Long Term Support and Standard Term Support versions. Official release metadata lists .NET 8 as an LTS release from November 2023, .NET 9 as an STS release from November 2024, and .NET 10 as an LTS release from November 2025.

### 采用历史

Adoption expanded from Windows-centered .NET Framework development into a cross-platform package-manager story: official downloads, Linux package repositories, container images, Homebrew, Chocolatey, and CI images all distribute the SDK and runtimes. That made `dotnet restore`, `dotnet build`, `dotnet test`, and `dotnet publish` common automation primitives outside Visual Studio.

### 使用方式

Developers use the `dotnet` CLI to create projects, restore NuGet packages, build, run, test, publish, manage workloads, and select SDK behavior through project files and global.json. It is both a language-runtime package and a build tool package.

### 为什么软件包爱好者会关心

For package nerds, .NET is important because it packages a large multi-runtime ecosystem behind one executable host. Versioned formulas such as dotnet@8 and dotnet@9 let systems pin SDK support windows, while the unversioned formula tracks the moving supported line used by workstations and CI images.

### 时间线

- 2014: Microsoft announced .NET Core would be open source.
- 2016: .NET Core 1.0 was released.
- 2020: .NET 5.0 started the unified post-Core naming line.
- 2023: .NET 8.0 shipped as an LTS release.
- 2024: .NET 9.0 shipped as an STS release.
- 2025: .NET 10.0 shipped as an LTS release.

### Related projects

- C#
- F#
- ASP.NET Core
- NuGet
- MSBuild
- Entity Framework Core

### 来源

- <https://devblogs.microsoft.com/dotnet/net-core-is-open-source/>
- <https://github.com/dotnet/core/blob/main/releases.md>
- <https://github.com/dotnet/runtime>
- <https://learn.microsoft.com/dotnet/core/tools/>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** dotnet
- **Aliases:** dotnet@10
- **Version Scheme:** 1
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## 其他软件包管理器记录

- Chocolatey - dotnet: normalized package name match | Chocolatey community package catalog: dotnet from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','dispcalgui.install'


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Language runtime packages](https://pkg.so/zh-hans/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [openssl@3](https://pkg.so/zh-hans/brew/openssl-3/) - Runtime dependency declared by Homebrew.
- [brotli](https://pkg.so/zh-hans/brew/brotli/) - Runtime dependency declared by Homebrew.
- [pkgconf](https://pkg.so/zh-hans/brew/pkgconf/) - Build dependency declared by Homebrew.
- [cmake](https://pkg.so/zh-hans/brew/cmake/) - Build dependency declared by Homebrew.
- [bash](https://pkg.so/zh-hans/brew/bash/) - Build dependency declared by Homebrew.
- [grep](https://pkg.so/zh-hans/brew/grep/) - Build dependency declared by Homebrew.
- [powershell](https://pkg.so/zh-hans/brew/powershell/) - Popular package that depends on this formula.
- [cdxgen](https://pkg.so/zh-hans/brew/cdxgen/) - Popular package that depends on this formula.
- [gitversion](https://pkg.so/zh-hans/brew/gitversion/) - Popular package that depends on this formula.
- [officecli](https://pkg.so/zh-hans/brew/officecli/) - Popular package that depends on this formula.
- [undercutf1](https://pkg.so/zh-hans/brew/undercutf1/) - Popular package that depends on this formula.
- [cyclonedx-cli](https://pkg.so/zh-hans/brew/cyclonedx-cli/) - Popular package that depends on this formula.
- [kiota](https://pkg.so/zh-hans/brew/kiota/) - Popular package that depends on this formula.
- [technitium-dns](https://pkg.so/zh-hans/brew/technitium-dns/) - Popular package that depends on this formula.
- [dotnet@8](https://pkg.so/zh-hans/brew/dotnet-8/) - Package name indicates the same formula family.
- [dotnet@9](https://pkg.so/zh-hans/brew/dotnet-9/) - Package name indicates the same formula family.
- [mono](https://pkg.so/zh-hans/brew/mono/) - Shares pkgdb curated category or tags: cli, dotnet, language-runtime, runtime.
- [node](https://pkg.so/zh-hans/brew/node/) - Shares pkgdb curated category or tags: cli, language-runtime, runtime.

## Combined YAML source

View the package source record on GitHub. [combined/dotnet.yml](https://github.com/mxcl/pkgdb/blob/main/combined/dotnet.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
