Azure / azure-dev

A developer CLI that reduces the time it takes for you to get started on Azure. The Azure Developer CLI (azd) provides a set of developer-friendly commands that map to key stages in your workflow - code, build, deploy, monitor, repeat.
https://aka.ms/azd
MIT License
369 stars 166 forks source link

portability issue for generated template in Aspire (.Net in general) #3825

Open vhvb1989 opened 2 weeks ago

vhvb1989 commented 2 weeks ago

When running azd init and auto-detecting the dotnet project in windows, azd is saving the path to the appHost project using windows path notation:

services:  
  app:
    language: dotnet
    project: .\src\AspireWithPostgres.AppHost\AspireWithPostgres.AppHost.csproj
    host: containerapp

This becomes an issue when cloning the project in linux/mac, as the path is not found.

The workaround is either deleting azure.yaml and running azd init to auto-gen again, or manually updating the path to

services:  
  app:
    language: dotnet
    project: ./src/AspireWithPostgres.AppHost/AspireWithPostgres.AppHost.csproj
    host: containerapp