microsoft / microsoft/aspire

`aspire update` fails to handle Windows-style path separators in project references on Linux/WSL

Open
#13,546 1 comment 0 reactions 0 assignees View on GitHub
area-cli
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Describe the bug

When running `aspire update` on Linux/WSL, the tool fails to update projects if a referenced project uses Windows-style (`\`) path separators in its relative path. The update command cannot open referenced files with backslashes in the path.

### Expected Behavior

`aspire update` should recognize and handle both Windows (`\`) and Unix (`/`) style path separators when resolving project references, regardless of the host OS. It should be able to resolve the referenced .csproj files and update as needed.

### Steps To Reproduce

1. On Linux or WSL, run the following command in a directory containing aspire projects:
```sh
find . -iname '*apphost.csproj' -exec aspire update --project {} --channel staging --non-interactive \;
```
2. Ensure that one of the referenced .csproj files contains Windows-style (`\`) path separators in its ``
3. Observe that `aspire update` fails to update the referenced project, as it cannot open the file with the Windows-style path.

### Exceptions (if any)

_No response_

### .NET Version info

_No response_

### Anything else?

Trying to update aspire samples on WSL (Linux). Encountered this with .csproj files referencing others using backslashes as path separators.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.