Claude Code Cannot Run dotnet Commands On Windows

Resolved 💬 4 comments Opened Jul 25, 2025 by nickamckenna Closed Aug 5, 2025

Environment

  • Platform (select one):
  • [ X] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.60 <!-- output of claude --version -->
  • Operating System: Windows 11 <!-- e.g. macOS 14.3, Windows 11, Ubuntu 22.04 -->
  • Terminal: GitBash, Powershell <!-- e.g. iTerm2, Terminal App -->

Bug Description

When claude code tries to run any dotnet command, it gets an error:

Error: /usr/bin/bash: line 1: C:Program: command not found

Claude code tries various variations on the original command to get it to work, but it never succeeds.

Steps to Reproduce

  1. Setup Windows 11 with dotnet 8 SDK
  2. Start up claude code
  3. Ask claude code to run a command like dotnet --info

Expected Behavior

The dotnet command should run.

Actual Behavior

Claude code always gets errors like

Error: /usr/bin/bash: line 1: C:Program: command not found

Additional Context

I have verified that the commands work correctly in the shell. They only fail when claude code tries to run them.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗