dotnet / dotnet/sdk

`dnx` command not found on bash with `windows-latest` runner

Open
#53,326 1 comment 0 reactions 0 assignees View on GitHub
area-Host untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

### Description

`dnx` command not found on bash with `windows-latest` runner.

### Reproduction Steps

On GitHub Actions:

```yml
on:
workflow_dispatch:

jobs:
repro:
runs-on: windows-latest
defaults:
run:
shell: bash # use bash

steps:
- uses: actions/checkout@v6
- uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.x.x'

- run: |
# Workaround: Use 'dotnet tool exec'
dotnet tool exec -y ghx -- --help

- run: |
dnx -y ghx -- --help
```

### Expected behavior

Works.

### Actual behavior

```
Run dnx -y ghx -- --help
dnx -y ghx -- --help
shell: C:\Program Files\Git\bin\bash.EXE --noprofile --norc -e -o pipefail {0}
env:
DOTNET_ROOT: C:\Program Files\dotnet

D:\a\_temp\de5c47a6-0c80-40de-801f-64820a7d2996.sh: line 1: dnx: command not found
Error: Process completed with exit code 127.
```

### Regression?

No

### Known Workarounds

Use `dotnet tool exec` instead.

### Configuration

_No response_

### Other information

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.