# @react-native-windows/find-dotnet-tools

> Helpers to locate .NET-based tools (e.g. pwsh) restored via NuGet or available on PATH.

Latest version **0.84.0** (published 2026-06-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install @react-native-windows/find-dotnet-tools
pnpm add @react-native-windows/find-dotnet-tools
yarn add @react-native-windows/find-dotnet-tools
bun add @react-native-windows/find-dotnet-tools
```

## Health

**Score 60/100 (C)** — status: active.

Positive: has types; no vulnerabilities; high maintenance score; popular repo.

Warnings: low downloads; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.84.0 |
| Published | 2026-06-18 |
| First published | 2026-05-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >= 22 |
| Dependencies | 1 |
| Unpacked size | 8.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 17344 |
| Maintainers | rnbot, dannyvv, microsoft1es, acoates, microsoft-oss-releases |

## Links

- npm: https://www.npmjs.com/package/@react-native-windows/find-dotnet-tools
- Repository: https://github.com/microsoft/react-native-windows
- Homepage: https://github.com/microsoft/react-native-windows#readme
- Issues: https://github.com/microsoft/react-native-windows/issues
- npm.io page: https://npm.io/package/@react-native-windows/find-dotnet-tools

## Dependencies (1)

- [@react-native-windows/fs](https://npm.io/package/@react-native-windows/fs.md) 0.84.0

## Recent versions

- 0.84.0 (latest) — 2026-06-18
- 0.0.0-canary.3 (v0.81-stable) — 2026-08-19
- 0.85.0-preview.1 (preview) — 2026-07-22
- 0.0.0 (v0.83-stable) — 2026-06-18
- 0.0.0-canary.2 (canary) — 2026-05-13

## README

# @react-native-windows/find-dotnet-tools

Helpers to locate .NET-based tools (e.g. PowerShell) restored via `dotnet tool restore` or
available on PATH.

Used to resolve tool paths consistently across local development and CI
environments.

## Usage

Add the package as a dependency:

```json
{
  "dependencies": {
    "@react-native-windows/find-dotnet-tools": "<version>"
  }
}
```

### findPowerShell

Locates a PowerShell executable by checking, in order:

1. A `dotnet-tool`-restored copy of `pwsh.exe` (skipped in CI builds)
2. `pwsh.exe` on the system PATH

Throws an error if `pwsh.exe` cannot be found.

```js
import {findPowerShell} from '@react-native-windows/find-dotnet-tools';

const pwsh = findPowerShell();
// e.g. "C:\\Users\\user\\.nuget\\packages\\PowerShell\\7.6.1\\tools\\net10.0\\any\\win\\pwsh.exe"
```

### getNugetGlobalPackagesFolder

Returns the path to the global NuGet packages folder by checking, in order:

1. The `NUGET_PACKAGES` environment variable
2. The output of `dotnet nuget locals global-packages --list`
3. The default `~/.nuget/packages` location

```js
import {getNugetGlobalPackagesFolder} from '@react-native-windows/find-dotnet-tools';

const packagesDir = getNugetGlobalPackagesFolder();
// e.g. "C:\\Users\\user\\.nuget\\packages"
```

---
_Source: https://npm.io/package/@react-native-windows/find-dotnet-tools · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
