Skip to content

Devcontainer port forwarding logic blows up if settings.json not present. #6873

@mitchdenny

Description

@mitchdenny

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

With #6780 an issue has been introduced where running in codespaces will crash if the settings.json file is not already present. We need to be resilient to this and create the file if it does not exist.

Expected Behavior

No exception.

Steps To Reproduce

Create a new codespace using this template: https://github.com/mitchdenny/aspire-devcontainer-nightly
Update to the latest nightly templates.
dotnet new aspire-starter
Launch the app
.... should fail.

We were not seeing this in the aspire repo because this file always exists.

Exceptions (if any)

No response

.NET Version info

No response

Anything else?

No response

Metadata

Metadata

Assignees

Labels

area-app-modelIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions